diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-09-06 20:12:21 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-09-06 20:12:21 +0000 |
commit | e254e4769d84e9d8e512eb225d079ca87800b5ef (patch) | |
tree | ac3ea3dd110b579118eb5f92e8c3177db7c92871 /perl-install/detect_devices.pm | |
parent | 967c918d9eaf22eceee3c3b3ed448d141e38fd00 (diff) | |
download | drakx-backup-do-not-use-e254e4769d84e9d8e512eb225d079ca87800b5ef.tar drakx-backup-do-not-use-e254e4769d84e9d8e512eb225d079ca87800b5ef.tar.gz drakx-backup-do-not-use-e254e4769d84e9d8e512eb225d079ca87800b5ef.tar.bz2 drakx-backup-do-not-use-e254e4769d84e9d8e512eb225d079ca87800b5ef.tar.xz drakx-backup-do-not-use-e254e4769d84e9d8e512eb225d079ca87800b5ef.zip |
no_comment
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index adc701a81..6bcf38ac6 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -228,6 +228,20 @@ sub syslog { `dmesg`; } +sub hasUsb { + my ($class, $prot) = @_; + foreach (cat_("/proc/bus/usb/devices")) { + if (/^P/ .. /^I/) { + my ($c, $p) = /Cls=(\d+).*Prot=(\d+)/; + $c == $class && ($prot < 0 || $prot == $p) and log::l("found usb $c $p"), return 1; + } + } + 0; +} +sub hasUsbKeyboard { hasUsb(3, 1) } +sub hasUsbMouse { hasUsb(3, 2) } +sub hasUsbZip { hasUsb(8, -1) } + sub hasSMP { c::detectSMP() } sub hasUltra66 { |