* [PATCH] debugfs: cleanup in do_show_debugfs_params
@ 2012-04-16 13:41 Zheng Liu
2012-04-16 14:21 ` Steven Liu
2012-04-24 18:33 ` Ted Ts'o
0 siblings, 2 replies; 4+ messages in thread
From: Zheng Liu @ 2012-04-16 13:41 UTC (permalink / raw)
To: linux-ext4; +Cc: Zheng Liu
From: Zheng Liu <wenqing.lz@taobao.com>
Remove 'out' variable and replace fprintf with printf.
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] debugfs: cleanup in do_show_debugfs_params
2012-04-16 13:41 [PATCH] debugfs: cleanup in do_show_debugfs_params Zheng Liu
@ 2012-04-16 14:21 ` Steven Liu
2012-04-16 14:41 ` Zheng Liu
2012-04-24 18:33 ` Ted Ts'o
1 sibling, 1 reply; 4+ messages in thread
From: Steven Liu @ 2012-04-16 14:21 UTC (permalink / raw)
To: Zheng Liu; +Cc: linux-ext4, Zheng Liu
Hi Zheng Liu,
What dose this mean, you use printf and not use stdout?
Reviewed-By Steven Liu <LiuQi@zecloud.cn>
2012/4/16 Zheng Liu <gnehzuil.liu@gmail.com>:
> From: Zheng Liu <wenqing.lz@taobao.com>
>
> Remove 'out' variable and replace fprintf with printf.
>
> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> ---
> 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--");
> }
>
> --
> 1.7.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] debugfs: cleanup in do_show_debugfs_params
2012-04-16 14:21 ` Steven Liu
@ 2012-04-16 14:41 ` Zheng Liu
0 siblings, 0 replies; 4+ messages in thread
From: Zheng Liu @ 2012-04-16 14:41 UTC (permalink / raw)
To: Steven Liu; +Cc: linux-ext4, Zheng Liu
On Mon, Apr 16, 2012 at 10:21:05PM +0800, Steven Liu wrote:
> Hi Zheng Liu,
>
> What dose this mean, you use printf and not use stdout?
printf() is the same as fprintf(stdout, ...). So I just remove 'out'
variable. Am I missing something?
Regards,
Zheng
>
>
> Reviewed-By Steven Liu <LiuQi@zecloud.cn>
>
> 2012/4/16 Zheng Liu <gnehzuil.liu@gmail.com>:
> > From: Zheng Liu <wenqing.lz@taobao.com>
> >
> > Remove 'out' variable and replace fprintf with printf.
> >
> > Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> > ---
> > 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--");
> > }
> >
> > --
> > 1.7.4.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] debugfs: cleanup in do_show_debugfs_params
2012-04-16 13:41 [PATCH] debugfs: cleanup in do_show_debugfs_params Zheng Liu
2012-04-16 14:21 ` Steven Liu
@ 2012-04-24 18:33 ` Ted Ts'o
1 sibling, 0 replies; 4+ messages in thread
From: Ted Ts'o @ 2012-04-24 18:33 UTC (permalink / raw)
To: Zheng Liu; +Cc: linux-ext4, Zheng Liu
On Mon, Apr 16, 2012 at 09:41:26PM +0800, Zheng Liu wrote:
> From: Zheng Liu <wenqing.lz@taobao.com>
>
> Remove 'out' variable and replace fprintf with printf.
>
> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-24 18:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 13:41 [PATCH] debugfs: cleanup in do_show_debugfs_params Zheng Liu
2012-04-16 14:21 ` Steven Liu
2012-04-16 14:41 ` Zheng Liu
2012-04-24 18:33 ` Ted Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).