linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eryu Guan <guaneryu@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Eryu Guan <guaneryu@gmail.com>
Subject: [PATCH 2/2] btrfs-progs: return error when canonicalize_path failed
Date: Wed,  8 Oct 2014 17:42:29 +0800	[thread overview]
Message-ID: <1412761349-32721-2-git-send-email-guaneryu@gmail.com> (raw)
In-Reply-To: <1412761349-32721-1-git-send-email-guaneryu@gmail.com>

Error out cmd_start_replace() if canonicalize_path() dstdev failed, add
the missing "goto leave_with_error;"

Signed-off-by: Eryu Guan <guaneryu@gmail.com>
---
 cmds-replace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmds-replace.c b/cmds-replace.c
index 51b7aaf..d5648d5 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -213,6 +213,7 @@ static int cmd_start_replace(int argc, char **argv)
 		fprintf(stderr,
 			"ERROR: Could not canonicalize path '%s': %s\n",
 			argv[optind + 1], strerror(errno));
+		goto leave_with_error;
 	}
 
 	if (is_numerical(srcdev)) {
-- 
1.8.3.1


  reply	other threads:[~2014-10-08  9:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08  9:42 [PATCH 1/2] btrfs-progs: don't report internal dev replace result if ioctl failed Eryu Guan
2014-10-08  9:42 ` Eryu Guan [this message]
2014-10-10  8:20 ` David Sterba
2014-10-10 11:02   ` Eryu Guan
2014-10-10 13:16   ` [PATCH v2 1/2] btrfs-progs: only report internal dev replace result if there's a result Eryu Guan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412761349-32721-2-git-send-email-guaneryu@gmail.com \
    --to=guaneryu@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).