diff options
Diffstat (limited to 'perl-install/c/stuff.xs.pm')
-rw-r--r-- | perl-install/c/stuff.xs.pm | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index 37c32296e..4eab2b172 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -205,18 +205,34 @@ void pci_probe(probe_type) int probe_type PPCODE: - struct pci_entries entries = pci_probe(probe_type); + struct pciusb_entries entries = pci_probe(probe_type); char buf[2048]; int i; EXTEND(SP, entries.nb); for (i = 0; i < entries.nb; i++) { - struct pci_entry e = entries.entries[i]; + struct pciusb_entry e = entries.entries[i]; snprintf(buf, sizeof(buf), "%04x\t%04x\t%04x\t%04x\t%s\t%s\t%s", e.vendor, e.device, e.subvendor, e.subdevice, pci_class2text(e.class), e.module ? e.module : "unknown", e.text); PUSHs(sv_2mortal(newSVpv(buf, 0))); } - pci_free(entries); + pciusb_free(entries); + +void +usb_probe() + PPCODE: + struct pciusb_entries entries = usb_probe(); + char buf[2048]; + int i; + + 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", + e.vendor, e.device, e.module ? e.module : "unknown", e.text); + PUSHs(sv_2mortal(newSVpv(buf, 0))); + } + pciusb_free(entries); char* crypt_md5(pw, salt) |