path: root/cmds-device.c
diff options
authorJosef Bacik <>2013-10-21 09:58:08 -0400
committerChris Mason <>2013-10-24 05:57:44 -0400
commitf3fb0020517838993d643fcee1987db918848979 (patch)
treed8f60d5caf8a239ef348742388e34eb7ffe3db7e /cmds-device.c
parentd1570a06184ed3748536a67693ef5cfd954d4032 (diff)
Btrfs-progs: make sure we return an error when we can't add a device
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 <> Signed-off-by: Chris Mason <>
Diffstat (limited to 'cmds-device.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds-device.c b/cmds-device.c
index 6f32356b..bc4a8dcd 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -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++;