summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/devices.pm10
2 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 4047d0a67..75e32c91f 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,6 @@
+- devices:
+ o get major/minor of device mapper correctly now that they are links
+
Version 13.23 - 30 April 2010
- diskdrake:
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index a50d70953..719472cea 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -173,6 +173,16 @@ sub entry {
}
}
}
+ # Try to access directly the device
+ # Now device mapper devices are links and do not appear in /proc or /sys
+ unless ($type) {
+ if (-e "/dev/$_") {
+ my (undef,undef,$mode,undef,undef,undef,$rdev,undef) = stat("/dev/$_");
+ ($major, $minor) = unmakedev($rdev);
+ $type = $mode & c::S_IFMT();
+ }
+ }
+
$type or internal_error("unknown device $_");
($type, $major, $minor);
}