summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm4
1 files changed, 3 insertions, 1 deletions
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|^[^/]+$|) {