diff options
author | Neil Brown <neilb@suse.de> | 2005-06-08 01:03:46 +0200 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2005-06-08 01:03:46 +0200 |
commit | ea32955930cc63d2fa445ff00437f5f767f7a4af (patch) | |
tree | 2778cbed10cdee740eea76dde1ab2f18f2ee6a09 /Detail.c | |
parent | Assorted fixes for bitmap related stuff (diff) | |
download | mdadm-ea32955930cc63d2fa445ff00437f5f767f7a4af.tar.xz mdadm-ea32955930cc63d2fa445ff00437f5f767f7a4af.zip |
Increase max-devs on type-1 superblocks
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -51,6 +51,7 @@ int Detail(char *dev, int brief, int test) int is_rebuilding = 0; int failed = 0; struct supertype *st = NULL; + int max_disks = MD_SB_DISKS; void *super = NULL; int rv = test ? 4 : 1; @@ -89,8 +90,10 @@ int Detail(char *dev, int brief, int test) stb.st_rdev = 0; rv = 0; + if (st) max_disks = st->max_devs; + /* try to load a superblock */ - for (d= 0; d<MD_SB_DISKS; d++) { + for (d= 0; d<max_disks; d++) { mdu_disk_info_t disk; char *dv; disk.number = d; @@ -210,7 +213,7 @@ int Detail(char *dev, int brief, int test) printf(" Number Major Minor RaidDevice State\n"); } - for (d= 0; d<MD_SB_DISKS; d++) { + for (d= 0; d < max_disks; d++) { mdu_disk_info_t disk; char *dv; disk.number = d; |