From 471e1eed85397a23424eee348b07734f1ce0a0f8 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 28 Aug 2002 22:29:30 +0000 Subject: - add "Removable:floppy", "Removable:memory_card", "Removable:camera" - usb-removables.pl is useful to update usbtable Removable:xxx based on device descriptions --- convert/usb-removables.pl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 convert/usb-removables.pl (limited to 'convert') diff --git a/convert/usb-removables.pl b/convert/usb-removables.pl new file mode 100755 index 00000000..822917ee --- /dev/null +++ b/convert/usb-removables.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl + +use lib qw(/usr/lib/libDrakX); +use detect_devices; + +require './merge2pcitable.pl'; +my $usbtable = read_pcitable($ARGV[0]); + +foreach (values %$usbtable) { + my $s = detect_devices::usb_description2removable($_->[1]) or next; + if ($_->[0] =~ /Removable:(.*)/) { + print STDERR "Conflicting $1 and $s for $_->[1]\n" if $1 ne $s; + } else { + print STDERR "Suggesting $s for $_->[1]\n"; + $_->[0] = "Removable:$s" if $_->[0] eq 'usb-storage'; + } +} +write_pcitable($usbtable); -- cgit v1.2.1