[PATCH] btrfs-progs: btrfs-debugfs: Display usage hint with no arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux