summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-12-18 10:12:59 +0000
committerThierry Vignaud <tv@mandriva.org>2008-12-18 10:12:59 +0000
commitf7e4f70d8af80bbf0430c88af19d577a57805d9f (patch)
tree9e568c0b2983d8ccb319d403a23006e00357bc0b
parent4b0e7d3fd654938d3cd435e66514d169898e3012 (diff)
downloaddrakx-f7e4f70d8af80bbf0430c88af19d577a57805d9f.tar
drakx-f7e4f70d8af80bbf0430c88af19d577a57805d9f.tar.gz
drakx-f7e4f70d8af80bbf0430c88af19d577a57805d9f.tar.bz2
drakx-f7e4f70d8af80bbf0430c88af19d577a57805d9f.tar.xz
drakx-f7e4f70d8af80bbf0430c88af19d577a57805d9f.zip
(entry) fix retrieving major/minor for whole discs (regression
introduced in previous commit (r250534))
-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();