WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH]fix pci.py

To: Simon Horman <horms@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]fix pci.py
From: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
Date: Tue, 16 Jun 2009 08:24:29 +0800
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 15 Jun 2009 17:25:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090615105608.GA3552@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4A3622BE.1020701@xxxxxxxxxx> <20090615105608.GA3552@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.21 (X11/20090302)
Simon Horman wrote:
> On Mon, Jun 15, 2009 at 06:30:22PM +0800, Zhigang Wang wrote:
>> hi,
>>
>> this patch adds support for older pciutils without -vmm option, and improves 
>> error handling
>> in get_info_from_lspci().
>>
>> see the test case and test result for detail.
>>
>> Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
> 
> Hi,
> 
> This looks good, but could you make a more informative subject-line?
> 
ok.

This patch adds support for older pciutils without -vmm option, and improves 
error handling
in get_info_from_lspci().

pciutils before commit: 3fd6b4d2e2fda814047664ffc67448ac782a8089 in
git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
has no -vmm option (it equals -vm). the result of lspci -vmm looks like:

Device: 02:00.0
Class:  Ethernet controller
Vendor: Broadcom Corporation
Device: NetXtreme BCM5751 Gigabit Ethernet PCI Express
SVendor:        Dell
SDevice:        Optiplex GX620
Rev:    01

Two Device as key.

pciutils with -vmm option:

Slot:   07:07.0
Class:  IDE interface
Vendor: Silicon Image, Inc.
Device: PCI0680 Ultra ATA-133 Host Controller
SVendor:        Silicon Image, Inc.
SDevice:        SiI 0680 ATA/133 Controller
Rev:    02
ProgIf: 85

The first Device becomes Slot.

For the second part of this patch: without this patch, only an KeyError raise,
it will not parse the extra keys, while the other keys still contains useful 
info.

Eg.

Slot:   07:02.0
Class:  VGA compatible controller
Vendor: ATI Technologies Inc
Device: Radeon RV100 QY [Radeon 7000/VE]
SVendor:        Dell
SDevice:        Device 0183

without a "Rev", it will not parse any of these fields.

thanks,

zhigang

> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>