diff options
author | Neil Brown <neilb@suse.de> | 2006-03-28 08:26:53 +0200 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-03-28 08:26:53 +0200 |
commit | 16c6fa807c1e43a1a12bbeb7668b4166d14b2cc8 (patch) | |
tree | 903679d6d0832899f1b36279bcb66e75b1e4c98f /Detail.c | |
parent | Fix messy --detail output when there is a failed device. (diff) | |
download | mdadm-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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, |