From patchwork Wed Feb 26 05:41:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 3721121 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AB06DBF13A for ; Wed, 26 Feb 2014 05:41:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E6DF9201D3 for ; Wed, 26 Feb 2014 05:41:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF3D520121 for ; Wed, 26 Feb 2014 05:41:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751363AbaBZFlX (ORCPT ); Wed, 26 Feb 2014 00:41:23 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:30195 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751157AbaBZFkp (ORCPT ); Wed, 26 Feb 2014 00:40:45 -0500 X-IronPort-AV: E=Sophos;i="4.97,544,1389715200"; d="scan'208";a="9606402" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 26 Feb 2014 13:36:49 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s1Q5ebLM012431 for ; Wed, 26 Feb 2014 13:40:37 +0800 Received: from adam-work.lan ([10.167.226.24]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2014022613381626-228568 ; Wed, 26 Feb 2014 13:38:16 +0800 From: Qu Wenruo To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs-progs: Remove the get_fslist error message. Date: Wed, 26 Feb 2014 13:41:38 +0800 Message-Id: <1393393298-25652-1-git-send-email-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 1.9.0 X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2014/02/26 13:38:16, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2014/02/26 13:38:17, Serialize complete at 2014/02/26 13:38:17 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- utils.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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; }