[Top][All Lists]

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH 00/11] misc: Add trailing '\n' to

From: Peter Maydell
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 00/11] misc: Add trailing '\n' to qemu_log() calls
Date: Fri, 8 Jun 2018 11:54:49 +0100

On 6 June 2018 at 20:43, John Snow <address@hidden> wrote:
> so error_setg must be used WITHOUT \n and logging must happen with \n?
> If we're sure that's the way we want to have things laid out, we really
> ought to augment checkpatch to catch this -- because there's 0% chance
> that we'll keep it straight on our own otherwise.

It's a historical side effect of them being basically separately
designed APIs. error_setg() takes the "give it the entire error
message" approach. logging is printf-style and gives the caller
flexibility to compose more complicated lines of logging with
multiple calls. Consistency between the two might be nice but
there are an awful lot of qemu_log calls in the codebase to check
and change to the other convention...

-- PMM

reply via email to

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