From c7dad17b3fb33460bdf011f7c785a9ebd2da47dc Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 15 Mar 2005 14:31:14 +0000 Subject: - add dmi_probe() - some special code on dmi is now moved in dmitable with flags Pkg: and Module: --- perl-install/c/stuff.xs.pl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'perl-install/c/stuff.xs.pl') 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() -- cgit v1.2.1