From patchwork Tue Jan 3 10:50:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lakshmipathi.G" X-Patchwork-Id: 9494755 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 7125660405 for ; Tue, 3 Jan 2017 11:08:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A64D26C2F for ; Tue, 3 Jan 2017 11:08:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4BFDE26CF9; Tue, 3 Jan 2017 11:08:55 +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 D5AB826C2F for ; Tue, 3 Jan 2017 11:08:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934971AbdACLIw (ORCPT ); Tue, 3 Jan 2017 06:08:52 -0500 Received: from smtpq1.tb.mail.iss.as9143.net ([212.54.42.164]:34863 "EHLO smtpq1.tb.mail.iss.as9143.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934045AbdACLIv (ORCPT ); Tue, 3 Jan 2017 06:08:51 -0500 X-Greylist: delayed 1042 seconds by postgrey-1.27 at vger.kernel.org; Tue, 03 Jan 2017 06:08:50 EST 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 1cOMgg-00052o-1F for linux-btrfs@vger.kernel.org; Tue, 03 Jan 2017 11:51:26 +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 1cOMga-00036Z-UL for linux-btrfs@vger.kernel.org; Tue, 03 Jan 2017 11:51:26 +0100 Received: from localhost.localdomain (fedori [127.0.0.1]) by webminal.org (8.14.4/8.14.4) with ESMTP id v03AopO8008946 for ; Tue, 3 Jan 2017 11:51:01 +0100 Received: (from laks@localhost) by localhost.localdomain (8.14.4/8.14.4/Submit) id v03AoenG008698 for linux-btrfs@vger.kernel.org; Tue, 3 Jan 2017 11:50:40 +0100 Date: Tue, 3 Jan 2017 11:50:40 +0100 From: "Lakshmipathi.G" To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs-progs: btrfs-debugfs: Display usage hint with no arguments Message-ID: <20170103105040.GA7231@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=AOdLUH6Vuo1sFZdJWH0A:9 a=CjuIK1q_8ugA:10 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 --- 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: