[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 5/5] qemu_set_log_filename: filename argument may be NULL
From: |
Richard Henderson |
Subject: |
Re: [PULL 5/5] qemu_set_log_filename: filename argument may be NULL |
Date: |
Tue, 11 Feb 2020 14:51:17 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 1/30/20 1:38 PM, Stefan Hajnoczi wrote:
> From: Salvador Fandino <address@hidden>
>
> NULL is a valid log filename used to indicate we want to use stderr
> but qemu_set_log_filename (which is called by bsd-user/main.c) was not
> handling it correctly.
>
> That also made redundant a couple of NULL checks in calling code which
> have been removed.
>
> Signed-off-by: Salvador Fandino <address@hidden>
> Message-Id: <address@hidden>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> trace/control.c | 4 +---
> util/log.c | 28 ++++++++++++++++------------
> vl.c | 5 +----
> 3 files changed, 18 insertions(+), 19 deletions(-)
This patch has broken -D <filename> for *-linux-user.
After e144a605a, all logging goes to stderr.
> + if (filename) {
> + char *pidstr = strstr(filename, "%");
> + if (pidstr) {
Also, the indentation is off.
r~
- Re: [PULL 5/5] qemu_set_log_filename: filename argument may be NULL,
Richard Henderson <=