From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH 2/3] Split off sysfs id retrieval Date: Tue, 15 Dec 2009 19:54:41 +0100 Message-ID: <4B27DB71.8000907@suse.de> References: <1260901828-5145-1-git-send-email-agraf@suse.de> <1260901828-5145-3-git-send-email-agraf@suse.de> <20091215183940.GB25724@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kvm list , Gleb Natapov , Muli Ben-Yehuda , Chris Wright To: "Michael S. Tsirkin" Return-path: Received: from cantor2.suse.de ([195.135.220.15]:45474 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932840AbZLOSym (ORCPT ); Tue, 15 Dec 2009 13:54:42 -0500 In-Reply-To: <20091215183940.GB25724@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 >> > > 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