From 89c3767a3a6ec7317a0d2d91bbafe5dcafe2d535 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 23 Sep 2009 18:08:57 +0000 Subject: (pci_probe__real,c::pci_probe) retrieve PCI revision (#42576) (needs ldetect >= 0.9) --- perl-install/c/stuff.xs.pl | 4 ++-- perl-install/detect_devices.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'perl-install') diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index 66971600d..16fdaef80 100644 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -263,8 +263,8 @@ pci_probe() EXTEND(SP, entries.nb); for (i = 0; i < entries.nb; i++) { struct pciusb_entry *e = &entries.entries[i]; - snprintf(buf, sizeof(buf), "%04x\t%04x\t%04x\t%04x\t%d\t%d\t%d\t%d\t%s\t%s\t%s\t%s", - e->vendor, e->device, e->subvendor, e->subdevice, e->pci_domain, e->pci_bus, e->pci_device, e->pci_function, + snprintf(buf, sizeof(buf), "%04x\t%04x\t%04x\t%04x\t%d\t%d\t%d\t%d\t%d\t%s\t%s\t%s\t%s", + e->vendor, e->device, e->subvendor, e->subdevice, e->pci_domain, e->pci_bus, e->pci_device, e->pci_function, e->pci_revision, pci_class2text(e->class_id), e->class, e->module ? e->module : "unknown", e->text); PUSHs(sv_2mortal(newSVpv(buf, 0))); } diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 6042b29e5..a48039034 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -1,6 +1,6 @@ package detect_devices; # $Id$ -use diagnostics; +#use diagnostics; use strict; use vars qw($pcitable_addons $usbtable_addons); @@ -803,7 +803,7 @@ my (@pci, @usb); sub pci_probe__real() { add_addons($pcitable_addons, map { my %l; - @l{qw(vendor id subvendor subid pci_domain pci_bus pci_device pci_function media_type nice_media_type driver description)} = split "\t"; + @l{qw(vendor id subvendor subid pci_domain pci_bus pci_device pci_function pci_revision media_type nice_media_type driver description)} = split "\t"; $l{$_} = hex $l{$_} foreach qw(vendor id subvendor subid); $l{bus} = 'PCI'; $l{sysfs_device} = sprintf('/sys/bus/pci/devices/%04x:%02x:%02x.%d', $l{pci_domain}, $l{pci_bus}, $l{pci_device}, $l{pci_function}); -- cgit v1.2.1