Skip to contentSkip to conversation

btrfs-progs: btrfs-debugfs: Display usage hint with no arguments

PATCH New Lakshmipathi.G 1 participant 1 message Jan 3, 2017 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: btrfs-debugfs: Display usage hint with no arguments

---
 btrfs-debugfs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
btrfs-debugfs +3 -1
index dfb8853..70419fa 100755
@@ -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:
Signature · 1 line
2.7.4