From patchwork Mon Apr 16 13:41:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: debugfs: cleanup in do_show_debugfs_params X-Patchwork-Submitter: Zheng Liu X-Patchwork-Id: 152860 Message-Id: <1334583686-4571-1-git-send-email-wenqing.lz@taobao.com> To: linux-ext4@vger.kernel.org Cc: Zheng Liu Date: Mon, 16 Apr 2012 21:41:26 +0800 From: Zheng Liu List-Id: From: Zheng Liu Remove 'out' variable and replace fprintf with printf. Signed-off-by: Zheng Liu --- debugfs/debugfs.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 590468d..99281ac 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -1973,12 +1973,10 @@ 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", + printf("Open mode: read-%s\n", current_fs->flags & EXT2_FLAG_RW ? "write" : "only"); - fprintf(out, "Filesystem in use: %s\n", + printf("Filesystem in use: %s\n", current_fs ? current_fs->device_name : "--none--"); }