diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-08-19 19:34:35 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-08-19 19:34:35 +0000 |
commit | f2c9aaef837eceaebbc643f77492fce69fb32f3f (patch) | |
tree | 6f657d56e7fc9e374fca80cf92dc4f2e6d52d018 /perl-install | |
parent | 47193590cbe2f3c1de7bac211464d525a87218f7 (diff) | |
download | drakx-backup-do-not-use-f2c9aaef837eceaebbc643f77492fce69fb32f3f.tar drakx-backup-do-not-use-f2c9aaef837eceaebbc643f77492fce69fb32f3f.tar.gz drakx-backup-do-not-use-f2c9aaef837eceaebbc643f77492fce69fb32f3f.tar.bz2 drakx-backup-do-not-use-f2c9aaef837eceaebbc643f77492fce69fb32f3f.tar.xz drakx-backup-do-not-use-f2c9aaef837eceaebbc643f77492fce69fb32f3f.zip |
full pci probe does not freeze anymore, removing code work-arounding the freeze
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/detect_devices.pm | 19 | ||||
-rw-r--r-- | perl-install/harddrake/data.pm | 2 | ||||
-rw-r--r-- | perl-install/modules.pm | 8 | ||||
-rw-r--r-- | perl-install/modules/interactive.pm | 1 | ||||
-rw-r--r-- | perl-install/mouse.pm | 13 | ||||
-rwxr-xr-x | perl-install/standalone/draksound | 2 | ||||
-rwxr-xr-x | perl-install/standalone/drakxtv | 2 |
7 files changed, 12 insertions, 35 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 57dd842f1..dadf0f3a0 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -406,15 +406,15 @@ sub getSerialModem { } sub getModem() { - my @pci_modems = grep { $_->{driver} =~ /www.linmodems.org/ } probeall(0); + my @pci_modems = grep { $_->{driver} =~ /www.linmodems.org/ } probeall(); getSerialModem({}), @pci_modems; } sub getSpeedtouch() { - grep { $_->{description} eq 'Alcatel|USB ADSL Modem (Speed Touch)' } probeall(0); + grep { $_->{description} eq 'Alcatel|USB ADSL Modem (Speed Touch)' } probeall(); } sub getSagem() { - grep { $_->{description} eq 'Analog Devices Inc.|USB ADSL modem' } probeall(0); + grep { $_->{description} eq 'Analog Devices Inc.|USB ADSL modem' } probeall(); } sub getNet() { @@ -504,16 +504,13 @@ sub pcmcia_probe() { @devs; } -# pci_probe with $probe_type is unsafe for pci! (bug in kernel&hardware) # pcmcia_probe provides field "device", used in network.pm # => probeall with $probe_type is unsafe -sub probeall { - my ($probe_type) = @_; - +sub probeall() { return if $::noauto; require sbus_probing::main; - pci_probe($probe_type), usb_probe(), pcmcia_probe(), sbus_probing::main::probe(); + pci_probe(), usb_probe(), pcmcia_probe(), sbus_probing::main::probe(); } sub matching_desc { my ($regexp) = @_; @@ -676,12 +673,6 @@ sub raidAutoStart { } } -sub is_a_recent_computer() { - my ($frequence) = map { /cpu MHz\s*:\s*(.*)/ } cat_("/proc/cpuinfo"); - $frequence > 600; -} - - sub usb_description2removable { local ($_) = @_; return 'camera' if /\bcamera\b/i; diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm index 227395f6a..809010f29 100644 --- a/perl-install/harddrake/data.pm +++ b/perl-install/harddrake/data.pm @@ -8,7 +8,7 @@ our @ISA = qw(Exporter); our @EXPORT_OK = qw(version tree); our ($version, $sbindir, $bindir) = ("9.1.1", "/usr/sbin", "/usr/bin"); -my @devices = detect_devices::probeall(1); +my @devices = detect_devices::probeall(); # Update me each time you handle one more devices class (aka configurator) sub unknown() { diff --git a/perl-install/modules.pm b/perl-install/modules.pm index e985ad531..01b6b9c1a 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -79,7 +79,7 @@ sub unload { } sub load_category { - my ($category, $o_wait_message, $b_probe_type) = @_; + my ($category, $o_wait_message) = @_; #- probe_category returns the PCMCIA cards. It doesn't know they are already #- loaded, so: @@ -104,12 +104,12 @@ sub load_category { $_->{try} = 1 if $_->{driver} eq 'hptraid'; !($_->{error} && $_->{try}); - } probe_category($category, $b_probe_type), + } probe_category($category), map { { driver => $_, description => $_, try => 1 } } @try_modules; } sub probe_category { - my ($category, $b_probe_type) = @_; + my ($category) = @_; my @modules = category2modules($category); @@ -126,7 +126,7 @@ sub probe_category { } else { member($_->{driver}, @modules); } - } detect_devices::probeall($b_probe_type); + } detect_devices::probeall(); } sub load_ide() { diff --git a/perl-install/modules/interactive.pm b/perl-install/modules/interactive.pm index 720f4308c..3acc1bfa2 100644 --- a/perl-install/modules/interactive.pm +++ b/perl-install/modules/interactive.pm @@ -31,7 +31,6 @@ sub load_category { my $w; my $wait_message = sub { $w = wait_load_module($in, $category, @_) }; @l = modules::load_category($category, $wait_message); - @l = modules::load_category($category, $wait_message, 'force') if !@l && $b_at_least_one; } if (my @err = grep { $_ } map { $_->{error} } @l) { my $return = $in->ask_warn('', join("\n", @err)); diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 0a0a0503c..84b987002 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -313,19 +313,6 @@ sub detect() { #- in case only a wacom has been found, assume an inexistant mouse (necessary). @wacom and return fullname2mouse('none|No mouse', wacom => \@wacom); - if (detect_devices::is_a_recent_computer() && $::isInstall) { - #- special case for non detected usb interface on a box with no mouse. - #- we *must* find out if there really is no usb, otherwise the box may - #- not be accessible via the keyboard (if the keyboard is USB) - #- the only way to know this is to make a full pci probe - modules::get_probeall("usb-interface") or modules::load_category('bus/usb', '', 'unsafe'); - log::l("trying again to find a usb mouse"); - sleep 10; - if (my $mouse = $fast_mouse_probe->()) { - return $mouse; - } - } - #- 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 fullname2mouse("serial|Generic 2 Button Mouse", unsafe => 1); diff --git a/perl-install/standalone/draksound b/perl-install/standalone/draksound index 1e4f299f6..3f862c21f 100755 --- a/perl-install/standalone/draksound +++ b/perl-install/standalone/draksound @@ -31,7 +31,7 @@ my $in = 'interactive'->vnew('su'); modules::mergein_conf('/etc/modules.conf'); -my @devices = grep { $_->{media_type} eq 'MULTIMEDIA_AUDIO' } detect_devices::probeall(1); +my @devices = grep { $_->{media_type} eq 'MULTIMEDIA_AUDIO' } detect_devices::probeall(); if (@devices) { # TODO: That need some work for multiples sound cards map_index { diff --git a/perl-install/standalone/drakxtv b/perl-install/standalone/drakxtv index 03f626dca..058fb8986 100755 --- a/perl-install/standalone/drakxtv +++ b/perl-install/standalone/drakxtv @@ -128,7 +128,7 @@ You can install it by typing \"urpmi xawtv\" as root, in a console."))); } } -my @devices = grep { $_->{media_type} eq 'MULTIMEDIA_VIDEO' || $_->{driver} eq 'usbvision' } detect_devices::probeall(1); +my @devices = grep { $_->{media_type} eq 'MULTIMEDIA_VIDEO' || $_->{driver} eq 'usbvision' } detect_devices::probeall(); push @devices, { driver => 'bttv', description => 'dummy' } if $::testing && !@devices; if (@devices) { # TODO: That need some work for multiples TV cards |