diff options
author | Neil Brown <neilb@suse.de> | 2006-01-27 06:25:55 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-01-27 06:25:55 +0000 |
commit | 6baf9a876bafacdca142e92459a8ae4b90e4baf9 (patch) | |
tree | c0fb2c947e7b5c3b77aa15500edfa99b4e0ced81 /Examine.c | |
parent | 5dd497eecbb7dc453e6e1353e0e77bb4faeaeb3f (diff) | |
download | mdadm-6baf9a876bafacdca142e92459a8ae4b90e4baf9.tar.gz |
Provide error message if --examine does find a valid superblock
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'Examine.c')
-rw-r--r-- | Examine.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -56,7 +56,7 @@ int Examine(mddev_dev_t devlist, int brief, int scan, int SparcAdjust, struct su int fd; void *super = NULL; int rv = 0; - int err; + int err = 0; struct array { void *super; @@ -83,13 +83,17 @@ int Examine(mddev_dev_t devlist, int brief, int scan, int SparcAdjust, struct su st = guess_super(fd); if (st) err = st->ss->load_super(st, fd, &super, (brief||scan)?NULL:devlist->devname); - else + else { + if (!brief) + fprintf(stderr, Name ": No md superblock detected on %s.\n", devlist->devname); err = 1; + } close(fd); } - if (err) + if (err) { + rv = 1; continue; - if (err) rv =1; + } if (SparcAdjust) st->ss->update_super(NULL, super, "sparc2.2", devlist->devname, 0); |