]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-shell: Add default list to df 27894/head
authorVarsha Rao <varao@redhat.com>
Wed, 16 Oct 2019 10:41:31 +0000 (16:11 +0530)
committerVarsha Rao <varao@redhat.com>
Fri, 15 Nov 2019 11:21:05 +0000 (16:51 +0530)
Signed-off-by: Varsha Rao <varao@redhat.com>
src/tools/cephfs/cephfs-shell

index 9b3a94673a7e819e67084e9d3243452c51e1b18d..f63478bb17b1f2b4350e6184c00b7dad28235fc8 100755 (executable)
@@ -1114,7 +1114,7 @@ sub-directories, files')
     df_parser = argparse.ArgumentParser(description='Show information about\
                 the amount of available disk space')
     df_parser.add_argument('file', help='Name of the file', nargs='*',
-                           action=path_to_bytes)
+                           default=['.'], action=path_to_bytes)
 
     @with_argparser(df_parser)
     def do_df(self, arglist):
@@ -1122,8 +1122,8 @@ sub-directories, files')
         Display the amount of available disk space for file systems
         """
         header = True    # Set to true for printing header only once
-        if not arglist.file:
-            arglist.file = ls(cephfs.getcwd())
+        if b'.' == arglist.file[0]:
+            arglist.file = ls(b'.')
 
         for file in arglist.file:
             if isinstance(file, libcephfs.DirEntry):