summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/devices.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 515f9c210..40c420306 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -78,7 +78,8 @@ sub entry {
$type = c::S_IFBLK();
($major, $minor) = unmakedev(hex $1);
} elsif (/^(sd.)(\d{0,2})/) {
- ($major, $minor) = split(':', chomp_(cat_("/sys/block/$1/$1$2/dev")));
+ my $path = $2 ? "/sys/block/$1/$1$2/dev" : "/sys/block/$1/dev";
+ ($major, $minor) = split(':', chomp_(cat_($path)));
$type = c::S_IFBLK();
} elsif (/^hd(.)(\d{0,2})/) {
$type = c::S_IFBLK();