[PATCH] Btrfs-progs: make sure we return an error when we can't add a device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
---
 cmds-device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmds-device.c b/cmds-device.c
index 6f32356..bc4a8dc 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++;
 			continue;
 		}
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux