summaryrefslogtreecommitdiffstats
path: root/Detail.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-03-28 08:26:53 +0200
committerNeil Brown <neilb@suse.de>2006-03-28 08:26:53 +0200
commit16c6fa807c1e43a1a12bbeb7668b4166d14b2cc8 (patch)
tree903679d6d0832899f1b36279bcb66e75b1e4c98f /Detail.c
parentFix messy --detail output when there is a failed device. (diff)
downloadmdadm-16c6fa807c1e43a1a12bbeb7668b4166d14b2cc8.tar.xz
mdadm-16c6fa807c1e43a1a12bbeb7668b4166d14b2cc8.zip
Create missing /dev files where needed.
Whenever we need a device file to open, if one cannot be found in /dev, create a temporary one. Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Detail.c b/Detail.c
index a1139335..d322732c 100644
--- a/Detail.c
+++ b/Detail.c
@@ -105,12 +105,12 @@ int Detail(char *dev, int brief, int test)
disk.major == 0 &&
disk.minor == 0)
continue;
- if ((dv=map_dev(disk.major, disk.minor))) {
+ if ((dv=map_dev(disk.major, disk.minor, 1))) {
if (!super && (disk.state & (1<<MD_DISK_ACTIVE))) {
/* try to read the superblock from this device
* to get more info
*/
- int fd2 = open(dv, O_RDONLY);
+ int fd2 = dev_open(dv, O_RDONLY);
if (fd2 >=0 && st &&
st->ss->load_super(st, fd2, &super, NULL) == 0) {
struct mdinfo info;
@@ -307,7 +307,7 @@ int Detail(char *dev, int brief, int test)
rv |= 2;
rv |= 1;
}
- if ((dv=map_dev(disk.major, disk.minor))) {
+ if ((dv=map_dev(disk.major, disk.minor, 0))) {
if (brief) {
if (devices) {
devices = realloc(devices,