summaryrefslogtreecommitdiffstats
path: root/perl-install/devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-08-25 16:31:24 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-08-25 16:31:24 +0000
commitaaac324afdf01fa17b077040b283fc58ee6f8328 (patch)
treee46b5d20d093555ae9fdb2aff674a1487e398dbc /perl-install/devices.pm
parent4e915a66b1d826e7b9407ff1c25dd3889be5c220 (diff)
downloaddrakx-backup-do-not-use-aaac324afdf01fa17b077040b283fc58ee6f8328.tar
drakx-backup-do-not-use-aaac324afdf01fa17b077040b283fc58ee6f8328.tar.gz
drakx-backup-do-not-use-aaac324afdf01fa17b077040b283fc58ee6f8328.tar.bz2
drakx-backup-do-not-use-aaac324afdf01fa17b077040b283fc58ee6f8328.tar.xz
drakx-backup-do-not-use-aaac324afdf01fa17b077040b283fc58ee6f8328.zip
no_comment
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r--perl-install/devices.pm14
1 files changed, 6 insertions, 8 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 7932eb21b..8190096d2 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -40,15 +40,13 @@ sub make($) {
my ($type, $major, $minor);
my $prefix = '';
- if (m,^(.*)/(dev|tmp)/(.*),) {
- $prefix = $1;
- $_ = $3;
- } elsif (m,/,) {
- die "can't make device $file";
+ if (m,^(.*/(?:dev|tmp))/(.*),) {
+ $_ = $2;
+ } else {
+ $file = "$prefix/dev/$_";
+ -e $file or $file = "$prefix/tmp/$_";
}
- $file = "$prefix/dev/$_";
- -e $file or $file = "$prefix/tmp/$_";
- -e $file and return $file; # assume nobody takes fun at creating files named as device
+ -e $file and return $file; # assume nobody takes fun at creating files named as device
if (/^sd(.)(\d{0,2})/) {
$type = c::S_IFBLK();