summaryrefslogtreecommitdiffstats
path: root/Detail.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-06-08 01:03:46 +0200
committerNeil Brown <neilb@suse.de>2005-06-08 01:03:46 +0200
commitea32955930cc63d2fa445ff00437f5f767f7a4af (patch)
tree2778cbed10cdee740eea76dde1ab2f18f2ee6a09 /Detail.c
parentAssorted fixes for bitmap related stuff (diff)
downloadmdadm-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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Detail.c b/Detail.c
index 8d7a5ffc..370177a4 100644
--- a/Detail.c
+++ b/Detail.c
@@ -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;