diff options
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/c/stuff.xs.pl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index 86f826f7b..b2929adeb 100755 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -289,6 +289,22 @@ char* get_pci_description(int vendor_id,int device_id) void +hid_probe() + PPCODE: + struct hid_entries entries = hid_probe(); + int i; + + EXTEND(SP, entries.nb); + for (i = 0; i < entries.nb; i++) { + struct hid_entry *e = &entries.entries[i]; + HV *rh = (HV *)sv_2mortal((SV *)newHV()); + hv_store(rh, "description", 11, newSVpv(e->text, 0), 0); + hv_store(rh, "driver", 6, newSVpv(e->module, 0), 0); + PUSHs(newRV((SV *)rh)); + } + hid_entries_free(&entries); + +void pci_probe() PPCODE: struct pciusb_entries entries = pci_probe(); |