free_gpt(st);
- if (st->subarray[0])
- return 1;
-
if (posix_memalign((void**)&super, 512, 32*512) != 0) {
fprintf(stderr, Name ": %s could not allocate superblock\n",
__func__);
return 0;
}
-static void getinfo_gpt(struct supertype *st, struct mdinfo *info)
+static void getinfo_gpt(struct supertype *st, struct mdinfo *info, char *map)
{
struct GPT *gpt = st->sb + 512;
struct GPT_part_entry *gpe = st->sb + 1024;
if (!st)
return st;
- if (strcmp(arg, "gpt") != 0)
+ if (strcmp(arg, "gpt") != 0) {
+ free(st);
return NULL;
+ }
st->ss = &gpt;
st->info = NULL;
#ifndef MDASSEMBLE
static int validate_geometry(struct supertype *st, int level,
int layout, int raiddisks,
- int chunk, unsigned long long size,
+ int *chunk, unsigned long long size,
char *subdev, unsigned long long *freesize,
int verbose)
{
struct superswitch gpt = {
#ifndef MDASSEMBLE
.examine_super = examine_gpt,
-#endif
.validate_geometry = validate_geometry,
+#endif
.match_metadata_desc = match_metadata_desc,
.load_super = load_gpt,
.store_super = store_gpt,