qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-trivial] [PULL 21/23] bsd-user: replace fprintf(s


From: Michael Tokarev
Subject: Re: [Qemu-devel] [Qemu-trivial] [PULL 21/23] bsd-user: replace fprintf(stderr, ...) with error_report()
Date: Mon, 02 Jun 2014 16:08:14 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0

01.06.2014 02:39, Peter Maydell wrote:
> On 26 May 2014 08:20, Michael Tokarev <address@hidden> wrote:
>> From: Le Tan <address@hidden>
>>
>> Replace fprintf(stderr,...) with error_report() in files bsd-user/*.
>> The trailing "\n"s of the @fmt argument have been removed
>> because @fmt of error_report() should not contain newline.
>>
>> Signed-off-by: Le Tan <address@hidden>
>> Signed-off-by: Michael Tokarev <address@hidden>
> 
> Was this patch tested? Building on FreeBSD the compiler
> complains:
> "warning: implicit declaration of function 'error_report' is invalid in C99"
> 
> because none of these bsd-user files include a header which
> gives a prototype for error_report. Also, these are just
> straightforward reporting of command line errors, and I
> think that, like the linux-user code, we should handle
> these in the obvious way by printing to stderr. There's no
> need to drag in the error-handling framework for this,
> especially since user-mode doesn't have the "maybe we
> need to send this to the monitor" issues system emulation
> does.

Umm.  it is a Very Good call.

I applied it and actually tried to compile-check it, on kFreeBSD.
Compile went successfully, and I was satisfied, until I figured
that my kFreeBSD test script only builds qemu-system.  So I went
back and enabled this, and actually found the issue and even
fixed it locally, by adding the #includes.  While doing this, I
wondered, why such a basic/common subsystem is not included in
there to start with, and so isn't used?  Maybe this is something
which shouldn't be done?

But I got distracted from all this due to other issues, and when
I come back I just pushed the whole thing without noticing the
added #includes aren't committed, and forgetting about my doubts.
That's what you get when doing stuff in a hurry.

> In short, I think we need to revert this commit
> (1fba509527beb).

Yes, that's what I think too.  Should I send a formal patch
submission, or is `git revert' easy enough?  Even with my
Signed-off-by: Michael Tokarev <address@hidden>
if needed?

Thanks,

/mjt




reply via email to

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