Consistent indentation of find-device-port-linux-udev helper script

pull/281/head
Michael Richters 7 years ago
parent be4fdd5432
commit 69946554dd

@ -9,22 +9,22 @@ my @paths= `ls $prefix`;
my %devices;
for my $path (@paths) {
chomp($path);
next unless -l $prefix. $path;
my @data = `udevadm info -q property --name=${prefix}${path}`;
for my $line (@data) {
chomp($path);
next unless -l $prefix. $path;
my @data = `udevadm info -q property --name=${prefix}${path}`;
for my $line (@data) {
chomp ($line);
my ($key,$val) = split(/=/,$line,2);
$devices{$path}{$key} = $val;
}
if (($devices{$path}{'ID_VENDOR_ID'} == $vid) &&
($devices{$path}{'ID_MODEL_ID'} == $pid) ) {
$devices{$path}{$key} = $val;
}
if (($devices{$path}{'ID_VENDOR_ID'} == $vid) &&
($devices{$path}{'ID_MODEL_ID'} == $pid) ) {
if ($devices{$path}{'ID_MM_CANDIDATE'}) {
warn "Yikes. ModemManager wants to pwn your keyboard";
}
if ($devices{$path}{'ID_MM_CANDIDATE'}) {
warn "Yikes. ModemManager wants to pwn your keyboard";
}
print $devices{$path}{DEVNAME};
exit(0);
}
print $devices{$path}{DEVNAME};
exit(0);
}
}

Loading…
Cancel
Save