summaryrefslogtreecommitdiffstats
path: root/Incremental.c
diff options
context:
space:
mode:
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Incremental.c b/Incremental.c
index 7b5970e..8bc455d 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -954,15 +954,20 @@ static int IncrementalNewDisk(char *devname, int verbose, int export,
close(dfd);
return 1;
}
+ if (domain->handler->check_table(dfd, verbose, export, domain) == 0)
+ return 0;
/*
* OK, at this point we have a valid block device without a
- * superblock. If we aren't in force mode, then don't use the
+ * superblock, the partition table doesn't match, and we are a
+ * partition domain. If we aren't in force mode, then don't use the
* device unless it's "clean", meaning no filesystems, no lvm,
* no anything. The requirement here is that both the first and
* last 4k of the device must be one of three patterns: 0x00, 0x5a,
* or 0xff.
*/
-
+ if (force(domain))
+ return domain->handler->write_table(dfd, verbose, export,
+ domain);
return 0;
}