From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 2/3] Split off sysfs id retrieval Date: Tue, 15 Dec 2009 23:05:37 +0200 Message-ID: <20091215210537.GB26712@redhat.com> References: <1260901828-5145-1-git-send-email-agraf@suse.de> <1260901828-5145-3-git-send-email-agraf@suse.de> <20091215183940.GB25724@redhat.com> <4B27DB71.8000907@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm list , Gleb Natapov , Muli Ben-Yehuda , Chris Wright To: Alexander Graf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:31206 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933258AbZLOVI0 (ORCPT ); Tue, 15 Dec 2009 16:08:26 -0500 Content-Disposition: inline In-Reply-To: <4B27DB71.8000907@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Dec 15, 2009 at 07:54:41PM +0100, Alexander Graf wrote: > 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 Hmm, you are right. Acked-by: Michael S. Tsirkin