All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: btrfs-debugfs: Display usage hint with no arguments
@ 2017-01-03 10:50 Lakshmipathi.G
  0 siblings, 0 replies; 6+ messages in thread
From: Lakshmipathi.G @ 2017-01-03 10:50 UTC (permalink / raw)
  To: linux-btrfs

---
 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:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] btrfs-progs: btrfs-debugfs: Display usage hint with no arguments
@ 2017-01-03 11:58 Lakshmipathi.G
  2017-01-03 14:46 ` David Sterba
       [not found] ` <ae61834f-3157-dbef-5566-ac102d43cbc4@cn.fujitsu.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Lakshmipathi.G @ 2017-01-03 11:58 UTC (permalink / raw)
  To: linux-btrfs

Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in>
---
 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:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-04 14:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-03 10:50 [PATCH] btrfs-progs: btrfs-debugfs: Display usage hint with no arguments Lakshmipathi.G
2017-01-03 11:58 Lakshmipathi.G
2017-01-03 14:46 ` David Sterba
2017-01-03 15:28   ` Lakshmipathi.G
2017-01-03 16:06     ` David Sterba
     [not found] ` <ae61834f-3157-dbef-5566-ac102d43cbc4@cn.fujitsu.com>
2017-01-04 14:13   ` Lakshmipathi.G

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.