summaryrefslogtreecommitdiffstats
path: root/perl-install/c/stuff.xs.pl
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2017-02-25 08:13:08 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2017-03-06 16:49:22 +0100
commit4732690283a60cd39918b94d636c3d246f8f27d2 (patch)
treeba2472faa73cb54a18d135c6c97a8a17e901a059 /perl-install/c/stuff.xs.pl
parentca1219fe52d016e68727151150c0d19320220108 (diff)
downloaddrakx-4732690283a60cd39918b94d636c3d246f8f27d2.tar
drakx-4732690283a60cd39918b94d636c3d246f8f27d2.tar.gz
drakx-4732690283a60cd39918b94d636c3d246f8f27d2.tar.bz2
drakx-4732690283a60cd39918b94d636c3d246f8f27d2.tar.xz
drakx-4732690283a60cd39918b94d636c3d246f8f27d2.zip
bind hid_probe()
Needed for next commit It could also be later used for drakx's lspci (like for ldetect's lspcidrake)
Diffstat (limited to 'perl-install/c/stuff.xs.pl')
-rwxr-xr-xperl-install/c/stuff.xs.pl16
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();