Whamcloud - gitweb
debugfs: with ls -l, include space between size and date
authorEric Biggers <ebiggers@google.com>
Mon, 13 Feb 2017 00:01:40 +0000 (16:01 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 16 Feb 2017 16:31:02 +0000 (11:31 -0500)
Before:
     11   40700 (2)      0      0   1228812-Feb-2017 12:51 lost+found

After:
     11   40700 (2)      0      0   12288 12-Feb-2017 12:51 lost+found

Fixes: 68a1de3df340 ("debugfs: pretty print encrypted filenames in the ls command")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
debugfs/ls.c

index 057e3f6..c990a93 100644 (file)
@@ -156,8 +156,7 @@ static int list_dir_proc(ext2_ino_t dir EXT2FS_ATTR((unused)),
                        fprintf(ls->f, "%5d", inode.i_size);
                else
                        fprintf(ls->f, "%5llu", EXT2_I_SIZE(&inode));
-               fputs(datestr, ls->f);
-               fputc(' ', ls->f);
+               fprintf(ls->f, " %s ", datestr);
                print_filename(ls->f, dirent, options);
                fputc('\n', ls->f);
        } else {