int is_26 = get_linux_version() >= 2006000;
int is_rebuilding = 0;
int failed = 0;
+ struct superswitch *ss = NULL;
void *super = NULL;
int rv = test ? 4 : 1;
close(fd);
return rv;
}
+ ss = super_by_version(array.major_version);
+
if (fstat(fd, &stb) != 0 && !S_ISBLK(stb.st_mode))
stb.st_rdev = 0;
rv = 0;
* to get more info
*/
int fd2 = open(dv, O_RDONLY);
- if (fd2 >=0 &&
- load_super0(fd2, &super, NULL) == 0) {
+ if (fd2 >=0 && ss &&
+ ss->load_super(fd2, &super, NULL) == 0) {
struct mdinfo info;
- getinfo_super0(&info, super);
+ ss->getinfo_super(&info, super);
if (info.array.ctime != array.ctime ||
info.array.level != array.level) {
free(super);
}
free_mdstat(ms);
- if (super)
- detail_super0(super);
+ if (super && ss)
+ ss->detail_super(super);
printf(" Number Major Minor RaidDevice State\n");
}
if (!brief) printf("\n");
}
if (spares && brief) printf(" spares=%d", spares);
- if (super && brief)
- brief_detail_super0(super);
+ if (super && brief && ss)
+ ss->brief_detail_super(super);
if (brief && devices) printf("\n devices=%s", devices);
if (brief) printf("\n");