From patchwork Mon Apr 13 12:37:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 6207831 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 304A6BF4A6 for ; Mon, 13 Apr 2015 12:28:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 68DFB202E9 for ; Mon, 13 Apr 2015 12:28:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77343202B4 for ; Mon, 13 Apr 2015 12:28:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932217AbbDMM2g (ORCPT ); Mon, 13 Apr 2015 08:28:36 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:27417 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753766AbbDMM22 (ORCPT ); Mon, 13 Apr 2015 08:28:28 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t3DCSPUj009711 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 13 Apr 2015 12:28:25 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t3DCSOMK018045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 13 Apr 2015 12:28:25 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t3DCSO2a023227; Mon, 13 Apr 2015 12:28:24 GMT Received: from OL.sg.oracle.com (/10.186.101.34) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 13 Apr 2015 05:28:24 -0700 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: dsterba@suse.cz Subject: [PATCH 1/1] btrfs-progs: improve troubleshooting avoid duplicate error strings Date: Mon, 13 Apr 2015 20:37:01 +0800 Message-Id: <1428928621-8001-1-git-send-email-anand.jain@oracle.com> X-Mailer: git-send-email 2.0.0.153.g79dcccc X-Source-IP: userv0021.oracle.com [156.151.31.71] 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, T_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 my troubleshooting experience says have unique error string per module. In the below eg, its one additional step to know error line, cat -n cmds-device.c | egrep "error removing the device" 185 "ERROR: error removing the device '%s' - %s\n", 190 "ERROR: error removing the device '%s' - %s\n", which is completely avoidable. Signed-off-by: Anand Jain --- cmds-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-device.c b/cmds-device.c index 1c72e90..1c32771 100644 --- a/cmds-device.c +++ b/cmds-device.c @@ -187,7 +187,7 @@ static int cmd_rm_dev(int argc, char **argv) ret++; } else if (res < 0) { fprintf(stderr, - "ERROR: error removing the device '%s' - %s\n", + "ERROR: ioctl error removing the device '%s' - %s\n", argv[i], strerror(e)); ret++; }