From b6c3cec5e4422274a243e582c7725d62f0441297 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 5 Jul 2004 02:21:32 +0000 Subject: don't set {major} and {minor} to 0 when the device doesn't exist --- perl-install/fs.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 35399d3be..148f6cf23 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -142,7 +142,9 @@ sub subpart_from_wild_device_name { } if ($dev =~ m!^/(tmp|dev)/(.*)!) { my %part; - ($part{major}, $part{minor}) = unmakedev((stat "$::prefix$dev")[6]); + if (my $rdev = (stat "$::prefix$dev")[6]) { + ($part{major}, $part{minor}) = unmakedev($rdev); + } if (my $symlink = readlink("$::prefix$dev")) { if ($symlink =~ m|^[^/]+$|) { -- cgit v1.2.1