diff options
author | Neil Brown <neilb@suse.de> | 2005-05-04 01:44:40 +0200 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2005-05-04 01:44:40 +0200 |
commit | 82d9eba687c952a9919f756203706285d6c42f07 (patch) | |
tree | 53d8a29cc1e532aa0f05f888cfd6603dd9f4715f /Kill.c | |
parent | Add a 'super-switch' so that different format superblocks can be used. (diff) | |
download | mdadm-82d9eba687c952a9919f756203706285d6c42f07.tar.xz mdadm-82d9eba687c952a9919f756203706285d6c42f07.zip |
super1
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Fix raid5 creation with new code.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Diffstat (limited to 'Kill.c')
-rw-r--r-- | Kill.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -43,7 +43,7 @@ int Kill(char *dev, int force) void *super; int fd, rv = 0; - struct superswitch *ss; + struct supertype *st; fd = open(dev, O_RDWR|O_EXCL); if (fd < 0) { @@ -51,20 +51,20 @@ int Kill(char *dev, int force) dev); return 1; } - ss = guess_super(fd, dev); - if (ss == NULL) { + st = guess_super(fd); + if (st == NULL) { fprintf(stderr, Name ": Unrecognised md component device - %s\n", dev); return 1; } - rv = ss->load_super(fd, &super, dev); + rv = st->ss->load_super(st, fd, &super, dev); if (force && rv >= 2) rv = 0; /* ignore bad data in superblock */ if (rv== 0 || (force && rv >= 2)) { mdu_array_info_t info; info.major_version = -1; /* zero superblock */ free(super); - ss->init_super(&super, &info); - if (ss->store_super(fd, super)) { + st->ss->init_super(&super, &info); + if (st->ss->store_super(fd, super)) { fprintf(stderr, Name ": Could not zero superblock on %s\n", dev); rv = 1; |