From 1d8862cf613d671bcfbb796ca023161d2b907402 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 15 Mar 2011 16:31:20 +1100 Subject: [PATCH] Fix regression when using 'grow' to add a bitmap. When we allowed a devlist to accompany some --grow modes - but not --bitmap - we made --bitmap always fail, in stead of fail of a device was given to add. As 'devs_found' includes the md device, we need to compare against '1'. Signed-off-by: NeilBrown --- mdadm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdadm.c b/mdadm.c index c44c432..e01beec 100644 --- a/mdadm.c +++ b/mdadm.c @@ -1646,7 +1646,7 @@ int main(int argc, char *argv[]) } } else if (bitmap_file) { if (size >= 0 || raiddisks || chunk || - layout_str != NULL || devs_found) { + layout_str != NULL || devs_found > 1) { fprintf(stderr, Name ": --bitmap changes cannot be " "used with other geometry changes " "in --grow mode\n");