diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2014-07-23 13:47:34 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-08-22 15:07:02 +0200 |
commit | 10c8f34f519451d763ae6b40bd388d11f4d3d42f (patch) | |
tree | 4fff7d4bf283fcb5ec8d7c72d678587c74fa7ab6 /cmds-send.c | |
parent | b2d0e10d491f447cd2888e4af44fad9d442e524d (diff) | |
download | btrfs-progs-10c8f34f519451d763ae6b40bd388d11f4d3d42f.tar.gz |
btrfs-progs: Remove fprintf() in find_mount_root().
find_mount_root() function in utils.c should not print error string.
Caller should be responsible to print error string.
This patch will remove the only fprintf in find_mount_root() and modify
the caller a little to use strerror() to prompt users.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-send.c')
-rw-r--r-- | cmds-send.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmds-send.c b/cmds-send.c index 0e5bb54..9ec52dc 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -349,9 +349,10 @@ static int init_root_path(struct btrfs_send *s, const char *subvol) ret = find_mount_root(subvol, &s->root_path); if (ret < 0) { + fprintf(stderr, + "ERROR: failed to determine mount point for %s: %s\n", + subvol, strerror(-ret)); ret = -EINVAL; - fprintf(stderr, "ERROR: failed to determine mount point " - "for %s\n", subvol); goto out; } |