OSDN Git Service

debugfs: cleanup in do_show_debugfs_params
authorZheng Liu <wenqing.lz@taobao.com>
Tue, 24 Apr 2012 18:32:30 +0000 (14:32 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 24 Apr 2012 18:33:07 +0000 (14:33 -0400)
Remove 'out' variable and replace fprintf with printf.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debugfs/debugfs.c

index 590468d..cf80bd0 100644 (file)
@@ -1973,13 +1973,11 @@ void do_rmdir(int argc, char *argv[])
 void do_show_debugfs_params(int argc EXT2FS_ATTR((unused)),
                            char *argv[] EXT2FS_ATTR((unused)))
 {
-       FILE *out = stdout;
-
        if (current_fs)
-               fprintf(out, "Open mode: read-%s\n",
-                       current_fs->flags & EXT2_FLAG_RW ? "write" : "only");
-       fprintf(out, "Filesystem in use: %s\n",
-               current_fs ? current_fs->device_name : "--none--");
+               printf("Open mode: read-%s\n",
+                      current_fs->flags & EXT2_FLAG_RW ? "write" : "only");
+       printf("Filesystem in use: %s\n",
+              current_fs ? current_fs->device_name : "--none--");
 }
 
 #ifndef READ_ONLY