From 10c8f34f519451d763ae6b40bd388d11f4d3d42f Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Wed, 23 Jul 2014 13:47:34 +0800 Subject: 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 Signed-off-by: David Sterba --- cmds-send.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmds-send.c') 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; } -- cgit v1.2.1