[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 19/22] blkdebug: Alias "errno" as "error"
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v5 19/22] blkdebug: Alias "errno" as "error" |
Date: |
Fri, 13 Dec 2013 22:23:43 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 13.12.2013 um 22:00 hat Eric Blake geschrieben:
> On 12/13/2013 01:49 PM, Kevin Wolf wrote:
> > Am 13.12.2013 um 18:10 hat Max Reitz geschrieben:
> >> Introduce an alias "error" for "errno", since using the latter for QMP
> >> is sure to result in various syntax errors due to the name being used
> >> directly as an identifier.
> >>
> >> Signed-off-by: Max Reitz <address@hidden>
> >
> > I can't say I like this, but it seems we don't have an option.
>
> Don't we already have a way to use QMP keys that collide with C keywords
> (for example, "unix" in qapi's SocketAddress becomes "q_unix" in C)?
> Why can't we reuse that mechanism, and just add "errno" to the polluted
> words list so that the generated C code uses "q_errno" rather than
> having to invent an "error" alias?
Oh, I didn't know that this exists. Sounds better then, because it makes
the external interfaces uniform, even though internally we'd still have
aliases (errno/q_errno instead of errno/error then).
Kevin
pgpUWWSBmEq90.pgp
Description: PGP signature
- Re: [Qemu-devel] [PATCH v5 16/22] blkdebug: Make filename optional, (continued)
[Qemu-devel] [PATCH v5 18/22] blkverify: Don't require protocol filename, Max Reitz, 2013/12/13
[Qemu-devel] [PATCH v5 17/22] blkverify: Allow command-line configuration, Max Reitz, 2013/12/13
[Qemu-devel] [PATCH v5 19/22] blkdebug: Alias "errno" as "error", Max Reitz, 2013/12/13
[Qemu-devel] [PATCH v5 20/22] qapi: QMP interface for blkdebug and blkverify, Max Reitz, 2013/12/13
[Qemu-devel] [PATCH v5 21/22] qemu-io: Make filename optional, Max Reitz, 2013/12/13
[Qemu-devel] [PATCH v5 22/22] iotests: Test new blkdebug/blkverify interface, Max Reitz, 2013/12/13