summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-12-16 16:13:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-12-16 16:13:34 +0000
commit3bf40616e233d127ecc0c1f90edd740d23a361ca (patch)
tree123688226f45977d93c97ab68635dfd492a5f54d /perl-install
parente76ac94274b3c3e3bb809f9a73718a56e652631b (diff)
downloaddrakx-backup-do-not-use-3bf40616e233d127ecc0c1f90edd740d23a361ca.tar
drakx-backup-do-not-use-3bf40616e233d127ecc0c1f90edd740d23a361ca.tar.gz
drakx-backup-do-not-use-3bf40616e233d127ecc0c1f90edd740d23a361ca.tar.bz2
drakx-backup-do-not-use-3bf40616e233d127ecc0c1f90edd740d23a361ca.tar.xz
drakx-backup-do-not-use-3bf40616e233d127ecc0c1f90edd740d23a361ca.zip
use ldetect-lst
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile2
-rw-r--r--perl-install/Makefile.config4
-rw-r--r--perl-install/Makefile.drakxtools3
-rw-r--r--perl-install/c/stuff.xs.pm22
-rw-r--r--perl-install/detect_devices.pm16
-rw-r--r--perl-install/share/list1
-rwxr-xr-xperl-install/standalone/drakgw5
-rwxr-xr-xperl-install/standalone/mousedrake6
8 files changed, 44 insertions, 15 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 7767e65d6..71c0cf648 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -16,7 +16,7 @@ tar-drakxtools: clean
$(MAKE) -C ../tools clean
cd .. ; rm -rf drakxtools ; cp -af perl-install drakxtools ; cp -af tools/ddcprobe tools/serial_probe drakxtools
cd ../drakxtools ; rm -rf install* pkgs.pm ftp.pm t.pm */CVS ; mv Makefile.drakxtools Makefile ; mv -f standalone/* .
- cd .. ; tar cfI drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile Makefile.config share/MonitorsDB share/Cards+ share/CardsNames Newt c ddcprobe serial_probe share/po pci_probing sbus_probing resize_fat share/diskdrake.rc share/isdndb.net $(STANDALONEPMS) icons *.pm)
+ cd .. ; tar cfI drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile Makefile.config share/MonitorsDB share/Cards+ share/CardsNames Newt c ddcprobe serial_probe share/po sbus_probing resize_fat share/diskdrake.rc share/isdndb.net $(STANDALONEPMS) icons *.pm)
cd .. ; rm -rf drakxtools
$(DIRS):
diff --git a/perl-install/Makefile.config b/perl-install/Makefile.config
index a24f67bc8..3b3608a0e 100644
--- a/perl-install/Makefile.config
+++ b/perl-install/Makefile.config
@@ -4,7 +4,7 @@ ARCH := $(patsubst sparc%,sparc,$(ARCH))
VERSION = 2.2.10-BOOT
SUDO = sudo
SO_FILES = c/blib/arch/auto/c/c.so
-PMS = *.pm Newt/*.pm c/stuff.pm resize_fat/*.pm pci_probing/*.pm sbus_probing/*.pm commands install2 g_auto_install live_install live_install2
+PMS = *.pm Newt/*.pm c/stuff.pm resize_fat/*.pm sbus_probing/*.pm commands install2 g_auto_install live_install live_install2
STANDALONEPMS= diskdrake XFdrake mousedrake lspcidrake printerdrake keyboarddrake netdrake draknet drakxconf drakxservices draksec drakboot adduserdrake rpmdrake drakgw livedrake
PMS += $(STANDALONEPMS:%=standalone/%)
REP4PMS = /usr/bin/perl-install
@@ -15,7 +15,7 @@ BASE = $(ROOTDEST)/Mandrake/base
DESTREP4PMS = $(DEST)$(REP4PMS)
PERL = perl
LOCALFILES = $(patsubst %, ../tools/%,$(ARCH)/e2fsck.shared ddcprobe/ddcxinfos serial_probe/serial_probe xhost+)
-DIRS = c Newt pci_probing resize_fat #po
+DIRS = c Newt resize_fat #po
CFLAGS = -Wall
override CFLAGS += -pipe
diff --git a/perl-install/Makefile.drakxtools b/perl-install/Makefile.drakxtools
index 514840c64..f21df531e 100644
--- a/perl-install/Makefile.drakxtools
+++ b/perl-install/Makefile.drakxtools
@@ -1,6 +1,6 @@
include Makefile.config
-DIRS = ddcprobe serial_probe share/po Newt c pci_probing resize_fat
+DIRS = ddcprobe serial_probe share/po Newt c resize_fat
PREFIX =
SBINDEST = $(PREFIX)/usr/sbin
ETCDEST = $(PREFIX)/etc/gtk
@@ -33,7 +33,6 @@ install:
install -m 644 share/po/*.po $(LIBDEST)/po
install -m 644 $(patsubst %,Newt/%.pm,Newt) $(LIBDEST)/Newt
install -m 644 $(patsubst %,c/%.pm,stuff) $(LIBDEST)/c
- install -m 644 $(patsubst %,pci_probing/%.pm,main pcitable pci_class) $(LIBDEST)/pci_probing
install -m 644 $(patsubst %,sbus_probing/%.pm,main) $(LIBDEST)/sbus_probing
install -m 644 $(patsubst %,resize_fat/%.pm,main any boot_sector c_rewritten dir_entry directory fat info_sector io) $(LIBDEST)/resize_fat
cp -rf auto icons $(LIBDEST)
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index 37c32296e..4eab2b172 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -205,18 +205,34 @@ void
pci_probe(probe_type)
int probe_type
PPCODE:
- struct pci_entries entries = pci_probe(probe_type);
+ struct pciusb_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];
+ struct pciusb_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);
+ pciusb_free(entries);
+
+void
+usb_probe()
+ PPCODE:
+ struct pciusb_entries entries = usb_probe();
+ char buf[2048];
+ int i;
+
+ EXTEND(SP, entries.nb);
+ for (i = 0; i < entries.nb; i++) {
+ struct pciusb_entry e = entries.entries[i];
+ snprintf(buf, sizeof(buf), "%04x\t%04x\t%s\t%s",
+ e.vendor, e.device, e.module ? e.module : "unknown", e.text);
+ PUSHs(sv_2mortal(newSVpv(buf, 0)));
+ }
+ pciusb_free(entries);
char*
crypt_md5(pw, salt)
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index f8cc294fb..802110185 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -179,19 +179,29 @@ sub pci_probe {
my %l;
@l{qw(vendor id subvendor subid type driver description)} = split "\t";
$l{$_} = hex $l{$_} foreach qw(vendor id subvendor subid);
+ $l{bus} = 'PCI';
\%l
} c::pci_probe($probe_type);
}
-# pci_probing::main::probe with $probe_type is unsafe for pci! (bug in kernel&hardware)
+sub usb_probe {
+ map {
+ my %l;
+ @l{qw(vendor id driver description)} = split "\t";
+ $l{$_} = hex $l{$_} foreach qw(vendor id);
+ $l{bus} = 'USB';
+ \%l
+ } c::usb_probe();
+}
+
+# pci_probe with $probe_type is unsafe for pci! (bug in kernel&hardware)
# get_pcmcia_devices provides field "device", used in network.pm
# => probeall with $probe_type is unsafe
sub probeall {
my ($probe_type) = @_;
- require pci_probing::main;
require sbus_probing::main;
require modules;
- pci_probe($probe_type), sbus_probing::main::probe(), modules::get_pcmcia_devices();
+ pci_probe($probe_type), usb_probe(), sbus_probing::main::probe(), modules::get_pcmcia_devices();
}
sub matching_desc {
my ($regexp) = @_;
diff --git a/perl-install/share/list b/perl-install/share/list
index 3b0904bb7..eb2e8c977 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -136,3 +136,4 @@
/usr/share/ldetect-lst/MonitorsDB
/usr/share/ldetect-lst/isdn.db
/usr/share/ldetect-lst/pcitable
+/usr/share/ldetect-lst/usbtable
diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw
index 44bd8161b..f8e1a5cb3 100755
--- a/perl-install/standalone/drakgw
+++ b/perl-install/standalone/drakgw
@@ -167,7 +167,7 @@ Note: you need a dedicated Network Adapter to set up a Local Area Network (LAN).
Would you like to setup the Internet Connection Sharing?"), 1) or $in->exit(0);
#my @pci_ethernet_cards;
-#require pci_probing::main;
+#OBSOLETE! require pci_probing::main;
#($_->[0] =~ /NETWORK_ETHERNET/) and (push @pci_ethernet_cards, $_) foreach (pci_probing::main::probe('.'));
#($#pci_ethernet_cards == -1) and $in->ask_warn('', _("No PCI network ethernet devices found!")) and $in->exit(0);
@@ -549,6 +549,9 @@ $in->exit(0);
#-------------------------------------------------
#- $Log$
+#- Revision 1.18 2000/12/16 16:13:34 prigaux
+#- use ldetect-lst
+#-
#- Revision 1.17 2000/11/13 15:48:33 gc
#- Integrate Till's patches for better work with Cups.
#-
diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake
index 397a1f12a..27bbc8f9a 100755
--- a/perl-install/standalone/mousedrake
+++ b/perl-install/standalone/mousedrake
@@ -4,6 +4,7 @@ use lib qw(/usr/lib/libDrakX);
use common qw(:common :system);
use interactive;
+use detect_devices;
use mouse;
use c;
require 'dumpvar.pl';
@@ -29,9 +30,8 @@ if (!$mouse || !$::auto) {
$mouse = mouse::fullname2mouse($name);
if ($mouse->{device} eq "usbmouse") {
- require pci_probing::main;
- my ($c) = pci_probing::main::probe("serial_usb") or die _("no serial_usb found\n");
- eval { modules::load($c->[1], "serial_usb") };
+ my ($c) = grep { $_->{driver} =~ /usb-[ou]hci/ } detect_devices::pci_probe(0) or die _("no serial_usb found\n");
+ eval { modules::load($c->{driver}, "serial_usb") };
}
}
$mouse->{XEMU3} = 'yes' if $mouse->{nbuttons} < 3 && (!$::noauto || $in->ask_yesorno('', _("Emulate third button?"), 1));