From patchwork Tue Jan 3 11:58:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lakshmipathi.G" X-Patchwork-Id: 9494801 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D1DB9606B4 for ; Tue, 3 Jan 2017 11:59:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1A0D26490 for ; Tue, 3 Jan 2017 11:59:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B67FE26CF9; Tue, 3 Jan 2017 11:59:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27C9826C2F for ; Tue, 3 Jan 2017 11:59:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758243AbdACL7E (ORCPT ); Tue, 3 Jan 2017 06:59:04 -0500 Received: from smtpq1.tb.mail.iss.as9143.net ([212.54.42.164]:37809 "EHLO smtpq1.tb.mail.iss.as9143.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756583AbdACL7C (ORCPT ); Tue, 3 Jan 2017 06:59:02 -0500 Received: from [212.54.42.115] (helo=lsmtp1.tb.mail.iss.as9143.net) by smtpq1.tb.mail.iss.as9143.net with esmtp (Exim 4.86_2) (envelope-from ) id 1cONk2-0003vg-Mc for linux-btrfs@vger.kernel.org; Tue, 03 Jan 2017 12:58:58 +0100 Received: from dhcp-077-251-197-105.chello.nl ([77.251.197.105] helo=webminal.org) by lsmtp1.tb.mail.iss.as9143.net with esmtp (Exim 4.86_2) (envelope-from ) id 1cONjx-0006Ak-JU for linux-btrfs@vger.kernel.org; Tue, 03 Jan 2017 12:58:58 +0100 Received: from localhost.localdomain (fedori [127.0.0.1]) by webminal.org (8.14.4/8.14.4) with ESMTP id v03BwOkT004407 for ; Tue, 3 Jan 2017 12:58:34 +0100 Received: (from laks@localhost) by localhost.localdomain (8.14.4/8.14.4/Submit) id v03BwDVR004161 for linux-btrfs@vger.kernel.org; Tue, 3 Jan 2017 12:58:13 +0100 Date: Tue, 3 Jan 2017 12:58:13 +0100 From: "Lakshmipathi.G" To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs-progs: btrfs-debugfs: Display usage hint with no arguments Message-ID: <20170103115813.GA3228@fedori> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-SourceIP: 77.251.197.105 X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.2 cv=CpvPSjwD c=1 sm=1 tr=0 a=xM537bmGHqxVMGguserW4w==:17 a=kj9zAlcOel0A:10 a=IgFoBzBjUZAA:10 a=Ii29zHd6AAAA:8 a=AOdLUH6Vuo1sFZdJWH0A:9 a=CjuIK1q_8ugA:10 a=hUl28ISp9AlOTif-od5a:22 none X-Ziggo-Spam-Status: No Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Lakshmipathi.G --- btrfs-debugfs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/btrfs-debugfs b/btrfs-debugfs index dfb8853..70419fa 100755 --- a/btrfs-debugfs +++ b/btrfs-debugfs @@ -392,7 +392,9 @@ parser.add_argument('-f', '--file', action='store_const', const=1, help='get fil args = parser.parse_args() -if args.block_group: +if not (args.block_group or args.file): + print "No arguments passed. Type 'btrfs-debugfs -h' for usage." +elif args.block_group: for i in args.path[0:]: print_block_groups(i) elif args.file: