qemu-devel
[Top][All Lists]
Advanced

[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: Alex Bennée
Subject: Re: [PULL 5/5] qemu_set_log_filename: filename argument may be NULL
Date: Wed, 12 Feb 2020 10:45:50 +0000
User-agent: mu4e 1.3.8; emacs 26.1

Richard Henderson <address@hidden> writes:

> 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.

I posted:

  Subject: [PATCH] tracing: only allow -trace to override -D if set
  Date: Tue, 11 Feb 2020 11:10:54 +0000
  Message-Id: <address@hidden>

as a fix which partially reverted this.

>
>> +    if (filename) {
>> +            char *pidstr = strstr(filename, "%");
>> +            if (pidstr) {
>
> Also, the indentation is off.
>
>
> r~


-- 
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]