summaryrefslogtreecommitdiffstats
path: root/perl-install/c
diff options
context:
space:
mode:
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