From a1f0c87ac7f98f8555717fd934edf7e706b8694c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 7 Sep 2000 17:29:37 +0000 Subject: no_comment --- perl-install/mouse.pm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'perl-install/mouse.pm') diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 2382f9f1e..cb3dd3d9c 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -169,22 +169,21 @@ sub detect() { detect_devices::hasMousePS2 and return { %{name2mouse("Generic Mouse (PS/2)")}, unsafe => 1 }; - eval { commands::modprobe("serial") }; - my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r; - if (modules::get_alias("usb-interface") && detect_devices::hasUsbMouse()) { eval { modules::load("usbmouse"); modules::load("mousedev"); }; - if (!$@ && detect_devices::tryOpen("usbmouse")) { - $wacom or modules::unload("serial"); - return name2mouse("USB Mouse"), $wacom; + !$@ && detect_devices::tryOpen("usbmouse") and return name2mouse("USB Mouse"); + eval { + modules::unload("mousedev"); + modules::unload("usbmouse"); } - modules::unload("mousedev"); - modules::unload("usbmouse"); } + eval { commands::modprobe("serial") }; + my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r; + #- defaults to generic serial mouse on ttyS0. #- Oops? using return let return a hash ref, if not using it, it return a list directly :-) return { %{name2mouse("Generic Mouse (serial)")}, device => "ttyS0", unsafe => 1 }; -- cgit v1.2.1