summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-14 17:36:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-14 17:36:32 +0000
commit78e8097c578fb334c7440a5459fdb7aecc827feb (patch)
tree365a303dd0143c940451e55df0316b3aaf6c0a67 /perl-install/detect_devices.pm
parent0321ff25b57d94626c9a5c2d02fbdb5448474fc6 (diff)
downloaddrakx-78e8097c578fb334c7440a5459fdb7aecc827feb.tar
drakx-78e8097c578fb334c7440a5459fdb7aecc827feb.tar.gz
drakx-78e8097c578fb334c7440a5459fdb7aecc827feb.tar.bz2
drakx-78e8097c578fb334c7440a5459fdb7aecc827feb.tar.xz
drakx-78e8097c578fb334c7440a5459fdb7aecc827feb.zip
- add/remove spaces to make perl_checker happy
- remove redundant parentheses - add some parentheses for clarity
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm13
1 files changed, 5 insertions, 8 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 3ad4c31b6..23a867c2f 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -286,7 +286,7 @@ sub getIDE() {
my $type = ${{ disk => 'hd', cdrom => 'cdrom', tape => 'tape', floppy => 'fd' }}{$t} or next;
my $info = chomp_(cat_("$d/model")) || "(none)";
- my $num = ord (($d =~ /(.)$/)[0]) - ord 'a';
+ my $num = ord(($d =~ /(.)$/)[0]) - ord 'a';
my ($vendor, $model) = map {
if_($info =~ /^$_(-|\s)*(.*)/, $eide_hds{$_}, $2);
} keys %eide_hds;
@@ -640,23 +640,20 @@ sub whatUsbport() {
# Extract the printer data from the ID string
my ($manufacturer, $model, $serialnumber, $description) =
("", "", "", "");
- if (($idstr =~ /MFG:([^;]+);/) ||
- ($idstr =~ /MANUFACTURER:([^;]+);/)) {
+ if ($idstr =~ /MFG:([^;]+);/ || $idstr =~ /MANUFACTURER:([^;]+);/) {
$manufacturer = $1;
$manufacturer =~ s/Hewlett[-\s_]Packard/HP/;
$manufacturer =~ s/HEWLETT[-\s_]PACKARD/HP/;
}
# For HP's multi-function devices the real model name is in the "SKU"
# field. So use this field with priority for $model when it exists.
- if (($idstr =~ /MDL:([^;]+);/) ||
- ($idstr =~ /MODEL:([^;]+);/)) {
+ if ($idstr =~ /MDL:([^;]+);/ || $idstr =~ /MODEL:([^;]+);/) {
$model ||= $1;
}
if ($idstr =~ /SKU:([^;]+);/) {
$model = $1;
}
- if (($idstr =~ /DES:([^;]+);/) ||
- ($idstr =~ /DESCRIPTION:([^;]+);/)) {
+ if ($idstr =~ /DES:([^;]+);/ || $idstr =~ /DESCRIPTION:([^;]+);/) {
$description = $1;
$description =~ s/Hewlett[-\s_]Packard/HP/;
$description =~ s/HEWLETT[-\s_]PACKARD/HP/;
@@ -665,7 +662,7 @@ sub whatUsbport() {
$serialnumber = $1;
}
# Was there a manufacturer and a model in the string?
- if (($manufacturer eq "") || ($model eq "")) {
+ if ($manufacturer eq "" || $model eq "") {
next;
}
# No description field? Make one out of manufacturer and model.