Btrfs-progs: make sure we return an error when we can't add a device
authorJosef Bacik <jbacik@fusionio.com>
Mon, 21 Oct 2013 13:58:08 +0000 (09:58 -0400)
committerChris Mason <chris.mason@fusionio.com>
Thu, 24 Oct 2013 09:57:44 +0000 (05:57 -0400)
I noticed xfstests was failing in a weird way but it was because our device add
was failing but not actually returning an error so we were failing further down
the test.  Fix this by making sure we return an error if we fail the mkfs tests.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
cmds-device.c

index 6f32356..bc4a8dc 100644 (file)
@@ -98,6 +98,7 @@ static int cmd_add_dev(int argc, char **argv)
                res = test_dev_for_mkfs(argv[i], force, estr);
                if (res) {
                        fprintf(stderr, "%s", estr);
+                       ret++;
                        continue;
                }