int spares;
memset(sb, 0, MD_SB_BYTES + sizeof(bitmap_super_t));
+ st->sb = sb;
if (info->major_version == -1) {
/* zeroing the superblock */
*sbp = sb;
return rv;
}
-static int compare_super0(void **firstp, void *secondv)
+static int compare_super0(struct supertype *st, struct supertype *tst)
{
/*
* return:
* 2 wrong uuid
* 3 wrong other info
*/
- mdp_super_t *first = *firstp;
- mdp_super_t *second = secondv;
-
+ mdp_super_t *first = st->sb;
+ mdp_super_t *second = tst->sb;
int uuid1[4], uuid2[4];
+
if (second->md_magic != MD_SB_MAGIC)
return 1;
if (!first) {
first = malloc(MD_SB_BYTES + sizeof(struct bitmap_super_s));
memcpy(first, second, MD_SB_BYTES + sizeof(struct bitmap_super_s));
- *firstp = first;
+ st->sb = first;
return 0;
}
free(super);
return 2;
}
+ st->sb = super;
*sbp = super;
if (st->ss == NULL) {
st->ss = &super0;
st->ss = &super0;
st->minor_version = 90;
st->max_devs = MD_SB_DISKS;
+ st->sb = NULL;
if (strcmp(arg, "0") == 0 ||
strcmp(arg, "0.90") == 0 ||
strcmp(arg, "default") == 0