Re: [PATCH 2/3] Split off sysfs id retrieval

Alexander Graf
2009-12-15T18:54:42Z

Michael S. Tsirkin wrote:
> On Tue, Dec 15, 2009 at 07:30:27PM +0100, Alexander Graf wrote:
>
>> To retreive device and vendor ID from a PCI device, we need to read a
>> sysfs file. That code is currently hand written at least two times,
>> the later patch introducing two more calls.
>>
>> So let's move that out to a function.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>
>
> Shouldn't we be using libpci, as we already do
> in other places?
>

Yes, please! But converting it to libvirt is a different beast from just
splitting up existing code :-).

Tackling the device assignment code to make it readable and mergable is
definitely something we need to address - just not now :-).

Alex