summaryrefslogtreecommitdiffstats
path: root/perl-install/devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-03-08 10:27:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-03-08 10:27:13 +0000
commit0ebae9b982f0199e17f20a1a550c87422ca9a0b1 (patch)
tree43e197003dc50bbd4fe039ffa04bf57b7b853613 /perl-install/devices.pm
parent1e7ad7b2301370fcd5fb8fc8389335235178ac07 (diff)
downloaddrakx-0ebae9b982f0199e17f20a1a550c87422ca9a0b1.tar
drakx-0ebae9b982f0199e17f20a1a550c87422ca9a0b1.tar.gz
drakx-0ebae9b982f0199e17f20a1a550c87422ca9a0b1.tar.bz2
drakx-0ebae9b982f0199e17f20a1a550c87422ca9a0b1.tar.xz
drakx-0ebae9b982f0199e17f20a1a550c87422ca9a0b1.zip
nicer debug error message
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r--perl-install/devices.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 90358555c..b9f360431 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -91,7 +91,7 @@ sub entry {
'o' => [89,0], 'p' => [89,64],
'q' => [90,0], 'r' => [90,64],
's' => [91,0], 't' => [91,64],
- }}{$1} or die "unknown device $_" };
+ }}{$1} or internal_error("unknown device $_") };
$minor += $2 || 0;
} elsif (/^ram(.*)/) {
$type = c::S_IFBLK();
@@ -156,7 +156,7 @@ sub entry {
"vcsa" => [ c::S_IFCHR(), 7, 128 ],
"zero" => [ c::S_IFCHR(), 1, 5 ],
"null" => [ c::S_IFCHR(), 1, 3 ],
- }}{$_} or die "unknown device $_ (caller is " . join(":", caller()) . ")" };
+ }}{$_} or internal_error("unknown device $_") };
}
($type, $major, $minor);
}
@@ -173,8 +173,7 @@ sub make($) {
}
-e $file and return $file; #- assume nobody takes fun at creating files named as device
- my ($type, $major, $minor) = eval { entry($_) };
- $@ and die "unknown device $_ (caller is " . join(":", caller()) . ")";
+ my ($type, $major, $minor) = entry($_);
if ($file =~ m|/dev/| && -e '/dev/.devfsd') {
#- argh, creating devices is no good with devfs...