summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-06 17:09:36 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-06 17:09:36 +0000
commit5424ceca56bfb9a9a749d4ec618acf434c5dc4b3 (patch)
treebb4e03a1b009fed7cff243b5c2a4bb0ef076ad8b
parent2f6812f51d43e7b76aef7764a298b05154d308e4 (diff)
downloaddrakx-5424ceca56bfb9a9a749d4ec618acf434c5dc4b3.tar
drakx-5424ceca56bfb9a9a749d4ec618acf434c5dc4b3.tar.gz
drakx-5424ceca56bfb9a9a749d4ec618acf434c5dc4b3.tar.bz2
drakx-5424ceca56bfb9a9a749d4ec618acf434c5dc4b3.tar.xz
drakx-5424ceca56bfb9a9a749d4ec618acf434c5dc4b3.zip
no_comment
-rw-r--r--Makefile2
-rw-r--r--perl-install/detect_devices.pm8
-rw-r--r--perl-install/mouse.pm18
3 files changed, 17 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 38b203ea6..86b3f77cd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-BOOT_IMG = gi_hd.img gi_cdrom.img gi_network.img gi_network_ks.img gi_pcmcia.img
+BOOT_IMG = gi_hd.img gi_cdrom.img gi_network.img gi_network_ks.img gi_pcmcia.img gi_pcmcia_ks.img
BINS = install/install install/local-install install/installinit/init
DIRS = install install/installinit mouseconfig perl-install ddcprobe
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index f03bbd596..b8a1ff707 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -219,13 +219,7 @@ sub hasModem($) {
}
sub hasMousePS2() {
- my $t; sysread(tryOpen("psaux"), $t, 1) != 1 || $t ne "\xFE";
-}
-
-sub hasMouseUSB(;$) {
- my @modules = map { "usb-$_" } qw(uhci ohci ohci-hcd);
- my ($first) = @_;
-# modprobe(
+ my $t; sysread(tryOpen("psaux"), $t, 256) != 1 || $t ne "\xFE";
}
#-######################################################################################
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 795d859b1..ecedfff9a 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -8,6 +8,10 @@ use strict;
#-######################################################################################
use common qw(:common :system :functional :file);
use modules;
+use pci_probing::main;
+use detect_devices;
+use run_program;
+use commands;
use log;
my @mouses_fields = qw(nbuttons device MOUSETYPE XMOUSETYPE FULLNAME);
@@ -80,8 +84,16 @@ sub write($;$) {
}
sub detect() {
+ detect_devices::hasMousePS2 and return name2mouse("Generic Mouse (PS/2)");
+
my %l;
- eval { modules::load("serial") };
- @l{qw(FULLNAME nbuttons MOUSETYPE XMOUSETYPE device)} = split("\n", `mouseconfig --nointeractive 2>/dev/null`) or die "mouseconfig failed";
- \%l;
+ eval { commands::modprobe("serial") };
+ @l{qw(FULLNAME nbuttons MOUSETYPE XMOUSETYPE device)} = split("\n", `mouseconfig --nointeractive 2>/dev/null`) and return \%l;
+ eval { run_program::run("rmmod", "serial") };
+
+ if (my ($c) = pci_probing::main::probe("SERIAL_USB")) {
+ eval { modules::load($c->[1]) };
+ return name2mouse("Generic Mouse (PS/2)") if !$@ && detect_devices::tryOpen("usbmouse");
+ }
+ die "mouseconfig failed";
}