summaryrefslogtreecommitdiffstats
path: root/perl-install/devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-19 17:31:42 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-19 17:31:42 +0000
commit25f65beed0677fa247c513705dbf538225f979c4 (patch)
treee0ec937937cba2d6279e97b3b7036fe0856d5bb2 /perl-install/devices.pm
parenta0b5f74447cc699c43c354cb6397ed554605729b (diff)
downloaddrakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.gz
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.bz2
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.xz
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.zip
no_comment
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r--perl-install/devices.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 877e22680..b7f3a54d9 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -46,7 +46,7 @@ sub make($) {
$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();
@@ -54,7 +54,7 @@ sub make($) {
$minor = 16 * (ord($1) - ord('a')) + ($2 || 0);
} elsif (/^hd(.)(\d{0,2})/) {
$type = c::S_IFBLK();
- ($major, $minor) =
+ ($major, $minor) =
@{ $ {{'a' => [3, 0], 'b' => [3, 64],
'c' => [22,0], 'd' => [22,64],
'e' => [33,0], 'f' => [33,64],
@@ -76,7 +76,7 @@ sub make($) {
$major = 72 + $1;
$minor = 16 * $2 + ($4 || 0);
} else {
- ($type, $major, $minor) =
+ ($type, $major, $minor) =
@{ $ {{"aztcd" => [ c::S_IFBLK(), 29, 0 ],
"bpcd" => [ c::S_IFBLK(), 41, 0 ],
"cdu31a" => [ c::S_IFBLK(), 15, 0 ],
@@ -99,10 +99,10 @@ sub make($) {
"sjcd" => [ c::S_IFBLK(), 18, 0 ],
}}{$_} or die "unknown device $_" };
}
-
+
#- make a directory for this inode if needed.
- mkdir dirname($file), 0755;
-
+ mkdir dirname($file), 0755;
+
syscall_('mknod', $file, $type | 0600, makedev($major, $minor)) or die "mknod failed (dev $_): $!";
$file;