[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block/vvfat.c: remove debugging code to reinit
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH] block/vvfat.c: remove debugging code to reinit stderr if NULL |
Date: |
Tue, 19 Aug 2014 13:58:23 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 18.08.2014 um 13:41 hat Michael Tokarev geschrieben:
> Just log to stderr unconditionally, like other similar code does.
>
> Signed-off-by: Michael Tokarev <address@hidden>
> ---
> block/vvfat.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/block/vvfat.c b/block/vvfat.c
> index 70176b1..ea37023 100644
> --- a/block/vvfat.c
> +++ b/block/vvfat.c
> @@ -1082,11 +1082,6 @@ static int vvfat_open(BlockDriverState *bs, QDict
> *options, int flags,
> vvv = s;
> #endif
>
> -DLOG(if (stderr == NULL) {
> - stderr = fopen("vvfat.log", "a");
> - setbuf(stderr, NULL);
> -})
> -
> opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort);
> qemu_opts_absorb_qdict(opts, options, &local_err);
> if (local_err) {
Michael, it's fine to merge trivial block patches through your tree, but
can you please keep Stefan and me CCed anyway?
This specific patch isn't as trivial as it might look at the first
sight (in other words: it's wrong). The part that you probably missed is
that stderr isn't the real one when DEBUG is set:
#undef stderr
#define stderr STDERR
FILE* stderr = NULL;
So now you have a lot of fprintf(NULL, ...), which obviously makes qemu
segfault as soon as you enable debugging for vvfat.
Kevin