summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/c/stuff.xs.pl5
-rw-r--r--perl-install/detect_devices.pm1
2 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl
index b1e9d0691..c9477dae5 100644
--- a/perl-install/c/stuff.xs.pl
+++ b/perl-install/c/stuff.xs.pl
@@ -398,8 +398,9 @@ usb_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%s\t%s\t%s\t%d\t%d",
- e->vendor, e->device, usb_class2text(e->class_), e->module ? e->module : "unknown", e->text, e->pci_bus, e->pci_device);
+ struct usb_class_text class_text = usb_class2text(e->class_);
+ snprintf(buf, sizeof(buf), "%04x\t%04x\t%s|%s|%s\t%s\t%s\t%d\t%d",
+ e->vendor, e->device, class_text.usb_class_text, class_text.usb_sub_text, class_text.usb_prot_text, e->module ? e->module : "unknown", e->text, e->pci_bus, e->pci_device);
PUSHs(sv_2mortal(newSVpv(buf, 0)));
}
pciusb_free(&entries);
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 3f75e2cd9..83c64ce5f 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -509,6 +509,7 @@ sub usb_probe() {
add_addons($usbtable_addons, map {
my %l;
@l{qw(vendor id media_type driver description pci_bus pci_device)} = split "\t";
+ $l{media_type} = join('|', grep { $_ ne '(null)' } split('\|', $l{media_type}));
$l{$_} = hex $l{$_} foreach qw(vendor id);
$l{bus} = 'USB';
\%l