From patchwork Mon Apr 16 13:41:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Liu X-Patchwork-Id: 152860 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E9A22B6EF1 for ; Mon, 16 Apr 2012 23:35:07 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753849Ab2DPNfE (ORCPT ); Mon, 16 Apr 2012 09:35:04 -0400 Received: from mail-pz0-f52.google.com ([209.85.210.52]:54921 "EHLO mail-pz0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753639Ab2DPNfD (ORCPT ); Mon, 16 Apr 2012 09:35:03 -0400 Received: by dake40 with SMTP id e40so6930244dak.11 for ; Mon, 16 Apr 2012 06:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=S5lMlqJbLr1Iag2wRtL/+APhwAJpHIWQCNVv/YUTFNA=; b=QcQF2j9khhXQCHoCqTMP5xI+7GaxJ5RRgG6dX13s670fBgq6/sqnBGq81nv/qlJcu7 n0JK7BVIZrpLjDxbMGLdM7HylPPqsLw4Qjuutb89LBESHNEnTzIUmP2lsV4ycbZKkBKF ShIA1yVbT79L3mCUFF59m8aX2qMgHxv6A/48tUsjSwrjmxKol1+Xk2DpNqioHZIlbE4S BQ3i38LG+dF6J+L4Jhm+0poCuZxJY7eCwQp7Im1m8B4XVoFYYXyFj+zY8qZPSAVUGZSJ EmmF1/u95GLG+E+JQ3JkBFXHvXjujxDl43rCSP4ralPQUd5Fi2hXOkymdBCJ9+QOrRgV 0WHA== Received: by 10.68.213.104 with SMTP id nr8mr22791026pbc.91.1334583303089; Mon, 16 Apr 2012 06:35:03 -0700 (PDT) Received: from localhost.localdomain ([182.92.247.2]) by mx.google.com with ESMTPS id r10sm17732801pbf.22.2012.04.16.06.35.01 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 Apr 2012 06:35:02 -0700 (PDT) From: Zheng Liu To: linux-ext4@vger.kernel.org Cc: Zheng Liu Subject: [PATCH] debugfs: cleanup in do_show_debugfs_params Date: Mon, 16 Apr 2012 21:41:26 +0800 Message-Id: <1334583686-4571-1-git-send-email-wenqing.lz@taobao.com> X-Mailer: git-send-email 1.7.4.1 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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--"); }