From 0f22b998fb9cf8478810b89cd50fa5b4fbf11d38 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 19 Aug 2010 16:48:34 +1000 Subject: Add mbr pseudo metadata handler. To support incorpating a new bare device into a collection of arrays - one partition each - mdadm needs a modest understanding of partition tables. The main needs to be able to recognise a partition table on one device and copy it onto another. This will be done using pseudo metadata types 'mbr' and 'gpt'. Signed-off-by: NeilBrown --- Incremental.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Incremental.c') diff --git a/Incremental.c b/Incremental.c index fe6aad28..bcbd78d0 100644 --- a/Incremental.c +++ b/Incremental.c @@ -142,11 +142,13 @@ int Incremental(char *devname, int verbose, int runstop, rv = try_spare(devname, &dfd, policy, st, verbose); goto out; } - if (st->ss->load_super(st, dfd, NULL)) { + if (st->ss->compare_super == NULL || + st->ss->load_super(st, dfd, NULL)) { if (verbose >= 0) fprintf(stderr, Name ": no RAID superblock on %s.\n", devname); rv = try_spare(devname, &dfd, policy, st, verbose); + free(st); goto out; } close (dfd); dfd = -1; -- cgit v1.2.3