Message ID | 1546920567-11956-2-git-send-email-anand.jain@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [RESEND,1/2] btrfs-progs: check for no result before using results | expand |
diff --git a/cmds-replace.c b/cmds-replace.c index 42de4de8c031..696f24c5c6d5 100644 --- a/cmds-replace.c +++ b/cmds-replace.c @@ -295,6 +295,10 @@ static int cmd_replace_start(int argc, char **argv) goto leave_with_error; } + if (ret > 0) + error("ioctl(DEV_REPLACE_START) '%s': %s", path, + btrfs_err_str(ret)); + if (start_args.result != BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT && start_args.result !=