diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-08-20 00:57:40 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-08-20 00:57:40 +0000 |
commit | 2c43cf115f517fc50c13386258317f8678d54023 (patch) | |
tree | 4c6340d6a22da2cbbd081a15855d751867160034 /perl-install | |
parent | c2140930b7392193bc6da6d1796fcc4580638dca (diff) | |
download | drakx-2c43cf115f517fc50c13386258317f8678d54023.tar drakx-2c43cf115f517fc50c13386258317f8678d54023.tar.gz drakx-2c43cf115f517fc50c13386258317f8678d54023.tar.bz2 drakx-2c43cf115f517fc50c13386258317f8678d54023.tar.xz drakx-2c43cf115f517fc50c13386258317f8678d54023.zip |
add firewire_probe() and use it in probeall()
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/detect_devices.pm | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 7f9a7d511..4747667a3 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -487,6 +487,29 @@ sub usb_probe() { } c::usb_probe()); } +sub firewire_probe() { + my ($e, @l); + foreach (cat_('/proc/bus/ieee1394/devices')) { + if (m!Vendor/Model ID: (.*) \[(\w+)\] / (.*) \[(\w+)\]!) { + push @l, $e = { + vendor => hex($2), id => hex($4), + description => join('|', $1, $3), + bus => 'Firewire', + }; + } elsif (/Software Specifier ID: (\w+)/) { + $e->{specifier_id} = hex $1; + } elsif (/Software Version: (\w+)/) { + $e->{specifier_version} = hex $1; + } + } + foreach (@l) { + if ($e->{specifier_id} == 0x00609e && $e->{specifier_version} == 0x010483) { + add2hash($_, { driver => 'sbp2', description => "Generic Firewire Storage Controller" }); + } + } + @l; +} + sub pcmcia_probe() { -e '/var/run/stab' || -e '/var/lib/pcmcia/stab' or return (); @@ -508,7 +531,7 @@ sub probeall() { return if $::noauto; require sbus_probing::main; - pci_probe(), usb_probe(), pcmcia_probe(), sbus_probing::main::probe(); + pci_probe(), usb_probe(), firewire_probe(), pcmcia_probe(), sbus_probing::main::probe(); } sub matching_desc { my ($regexp) = @_; |