summaryrefslogtreecommitdiffstats
path: root/perl-install/c/stuff.xs.pl
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/c/stuff.xs.pl')
-rw-r--r--perl-install/c/stuff.xs.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl
index 889b29428..3abcd7690 100644
--- a/perl-install/c/stuff.xs.pl
+++ b/perl-install/c/stuff.xs.pl
@@ -403,6 +403,25 @@ usb_probe()
}
pciusb_free(&entries);
+void
+dmi_probe()
+ PPCODE:
+ //dmidecode_file = "/usr/share/ldetect-lst/dmidecode.Laptop.Dell-Latitude-C810";
+ //dmidecode_file = "../../soft/ldetect-lst/test/dmidecode.Laptop.Sony-Vaio-GRX316MP";
+
+ struct dmi_entries entries = dmi_probe();
+ char buf[2048];
+ int i;
+
+ EXTEND(SP, entries.nb);
+ for (i = 0; i < entries.nb; i++) {
+ snprintf(buf, sizeof(buf), "%s\t%s",
+ entries.entries[i].module, entries.entries[i].constraints);
+ PUSHs(sv_2mortal(newSVpv(buf, 0)));
+ }
+ dmi_entries_free(entries);
+
+
unsigned int
getpagesize()