summaryrefslogtreecommitdiffstats
path: root/perl-install/c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-12-16 00:01:01 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-12-16 00:01:01 +0000
commite76ac94274b3c3e3bb809f9a73718a56e652631b (patch)
tree3432bdcb3572cbb5f2119320479a740e21fcf151 /perl-install/c
parentb54e6a2e39241e56b58e94aeade346a55e4885e4 (diff)
downloaddrakx-e76ac94274b3c3e3bb809f9a73718a56e652631b.tar
drakx-e76ac94274b3c3e3bb809f9a73718a56e652631b.tar.gz
drakx-e76ac94274b3c3e3bb809f9a73718a56e652631b.tar.bz2
drakx-e76ac94274b3c3e3bb809f9a73718a56e652631b.tar.xz
drakx-e76ac94274b3c3e3bb809f9a73718a56e652631b.zip
pci_probing now done by libldetect
config files moved in package ldetect-lst
Diffstat (limited to 'perl-install/c')
-rw-r--r--perl-install/c/Makefile.PL2
-rw-r--r--perl-install/c/stuff.xs.pm18
2 files changed, 19 insertions, 1 deletions
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 <net/if.h>
#include <net/route.h>
+#include <libldetect.h>
#include <gdk/gdkx.h>
#include <X11/Xlib.h>
#include <X11/extensions/xf86misc.h>
@@ -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