From e76ac94274b3c3e3bb809f9a73718a56e652631b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 16 Dec 2000 00:01:01 +0000 Subject: pci_probing now done by libldetect config files moved in package ldetect-lst --- perl-install/c/Makefile.PL | 2 +- perl-install/c/stuff.xs.pm | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'perl-install/c') diff --git a/perl-install/c/Makefile.PL b/perl-install/c/Makefile.PL index 47ca17203..6fe8192f7 100644 --- a/perl-install/c/Makefile.PL +++ b/perl-install/c/Makefile.PL @@ -2,7 +2,7 @@ use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. -my $libs = '-L/usr/X11R6/lib -lX11 -lgdk -lXxf86misc'; +my $libs = '-L/usr/X11R6/lib -lX11 -lgdk -lXxf86misc -lldetect'; $libs .= ' -lrpm -lrpmio -lz' if $ENV{C_RPM}; WriteMakefile( diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index 63630c89b..37c32296e 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -28,6 +28,7 @@ print ' #include #include +#include #include #include #include @@ -200,6 +201,23 @@ _exit(status) int detectSMP() +void +pci_probe(probe_type) + int probe_type + PPCODE: + struct pci_entries entries = pci_probe(probe_type); + char buf[2048]; + int i; + + EXTEND(SP, entries.nb); + for (i = 0; i < entries.nb; i++) { + struct pci_entry e = entries.entries[i]; + snprintf(buf, sizeof(buf), "%04x\t%04x\t%04x\t%04x\t%s\t%s\t%s", + e.vendor, e.device, e.subvendor, e.subdevice, pci_class2text(e.class), e.module ? e.module : "unknown", e.text); + PUSHs(sv_2mortal(newSVpv(buf, 0))); + } + pci_free(entries); + char* crypt_md5(pw, salt) char *pw -- cgit v1.2.1