|
|
|
@ -34,7 +34,7 @@ sub parse_usermap_line {
|
|
|
|
|
|
|
|
|
|
my @rule;
|
|
|
|
|
while (my ($key, $flag) = each(%flags)) {
|
|
|
|
|
hex($match{match_flags}) & $flag and push @rule, qq(SYSFS{$key}=="$match{$key}",);
|
|
|
|
|
hex($match{match_flags}) & $flag and push @rule, qq(ATTRS{$key}=="$match{$key}",);
|
|
|
|
|
}
|
|
|
|
|
push @rule,
|
|
|
|
|
(
|
|
|
|
@ -47,9 +47,9 @@ sub parse_usermap_line {
|
|
|
|
|
print join(' ', @rule) . "\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
print "BUS!=\"usb\", GOTO=\"kcontrol_rules_end\"\n";
|
|
|
|
|
print "DRIVERS!=\"usb\", GOTO=\"kcontrol_rules_end\"\n";
|
|
|
|
|
print "ACTION!=\"add\"\, GOTO=\"kcontrol_rules_end\"\n";
|
|
|
|
|
print "SUBSYSTEM!=\"usb_device\"\, GOTO=\"kcontrol_rules_end\"\n\n";
|
|
|
|
|
print "SUBSYSTEMS!=\"usb\"\, GOTO=\"kcontrol_rules_end\"\n\n";
|
|
|
|
|
|
|
|
|
|
foreach my $usermap (@ARGV) {
|
|
|
|
|
open(my $IN, $usermap . (-x $usermap && "|")) or die "unable to open usermap $usermap";
|
|
|
|
|