summaryrefslogtreecommitdiffstats
path: root/perl-install/c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-15 14:31:14 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-15 14:31:14 +0000
commitc7dad17b3fb33460bdf011f7c785a9ebd2da47dc (patch)
tree27bc16991e9001d44b661162d92d26484294ffba /perl-install/c
parent7640d17c1c60117288767369534d875baf432314 (diff)
downloaddrakx-backup-do-not-use-c7dad17b3fb33460bdf011f7c785a9ebd2da47dc.tar
drakx-backup-do-not-use-c7dad17b3fb33460bdf011f7c785a9ebd2da47dc.tar.gz
drakx-backup-do-not-use-c7dad17b3fb33460bdf011f7c785a9ebd2da47dc.tar.bz2
drakx-backup-do-not-use-c7dad17b3fb33460bdf011f7c785a9ebd2da47dc.tar.xz
drakx-backup-do-not-use-c7dad17b3fb33460bdf011f7c785a9ebd2da47dc.zip
- add dmi_probe()
- some special code on dmi is now moved in dmitable with flags Pkg: and Module:
Diffstat (limited to 'perl-install/c')
-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()