diff mbox

btrfs-progs: Remove the get_fslist error message.

Message ID 1393393298-25652-1-git-send-email-quwenruo@cn.fujitsu.com (mailing list archive)
State Under Review, archived
Headers show

Commit Message

Qu Wenruo Feb. 26, 2014, 5:41 a.m. UTC
When calling get_fslist on a kernel doesn't support
BTRFS_IOC_GET_FSLIST, an error message will output but the codes will
continue using the old way to scan mounted fs.

Since the error message will fail xfstest/btrfs/006 testcase and there
is a fallback way, the message should not be printed.

Also other error message in get_fslist is not needed since the functions
in utils.c should not print any thing and caller will handle the error.
This patch just remove the unneeded perror messages.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 utils.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox

Patch

diff --git a/utils.c b/utils.c
index 33b3ddc..364c191 100644
--- a/utils.c
+++ b/utils.c
@@ -2209,10 +2209,8 @@  int get_fslist(struct btrfs_ioctl_fslist **out_fslist, u64 *out_count)
 
 	fd = open("/dev/btrfs-control", O_RDWR);
 	e = errno;
-	if (fd < 0) {
-		perror("failed to open /dev/btrfs-control");
+	if (fd < 0)
 		return -e;
-	}
 
 	/* space to hold 512 fsids, doesn't matter if small
 	 * it would fail and return count so then we try again
@@ -2238,8 +2236,6 @@  again:
 		free(fsargs);
 		goto again;
 	} else if (ret < 0) {
-		printf("ERROR: scan_fsid ioctl failed - %s\n",
-			strerror(e));
 		ret = -e;
 		goto out;
 	}