summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2014-07-23 13:47:34 +0800
committerDavid Sterba <dsterba@suse.cz>2014-08-22 15:07:02 +0200
commit10c8f34f519451d763ae6b40bd388d11f4d3d42f (patch)
tree4fff7d4bf283fcb5ec8d7c72d678587c74fa7ab6 /utils.c
parentb2d0e10d491f447cd2888e4af44fad9d442e524d (diff)
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 'utils.c')
-rw-r--r--utils.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/utils.c b/utils.c
index 18034e18..3d467c56 100644
--- a/utils.c
+++ b/utils.c
@@ -2356,12 +2356,8 @@ int find_mount_root(const char *path, char **mount_root)
}
endmntent(mnttab);
- if (!longest_match) {
- fprintf(stderr,
- "ERROR: Failed to find mount root for path %s.\n",
- path);
+ if (!longest_match)
return -ENOENT;
- }
ret = 0;
*mount_root = realpath(longest_match, NULL);