qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-1.4 12/12] QAPI QMP HMP: Fix and improve mem


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH for-1.4 12/12] QAPI QMP HMP: Fix and improve memchar-read/-write docs
Date: Tue, 05 Feb 2013 15:49:01 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 02/05/2013 09:22 AM, Markus Armbruster wrote:
> In particular, document the impact of our crappy UTF-8 handling on
> reading.
> 
> Now the QMP examples even work.
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  hmp-commands.hx  | 20 ++++++++------------
>  qapi-schema.json | 37 +++++++++++++++++++++++--------------
>  qemu-char.c      |  7 +++++++
>  qmp-commands.hx  | 37 +++++++++++++++++++------------------
>  4 files changed, 57 insertions(+), 44 deletions(-)

> +++ b/hmp-commands.hx
> @@ -844,16 +844,15 @@ ETEXI
>          .name       = "memchar_write",
>          .args_type  = "device:s,data:s",
>          .params     = "device data",
> -        .help       = "Provide writing interface for CirMemCharDriver. Write"
> -                      "'data' to it.",
> +        .help       = "Write to a memory character device",
>          .mhandler.cmd = hmp_memchar_write,
>      },
>  
>  STEXI
>  @item memchar_write @var{device} @var{data}
>  @findex memchar_write
> -Provide writing interface for CirMemCharDriver. Write @var{data}
> -to char device 'memory'.
> +Write @var{data} to memory character device @var{device}.  @var{data}
> +must be an UTF-8 string.

s/an UTF-8/a UTF-8/

Blame stupid English rules for making that one tough.  The rule of thumb
for leading 'h' and 'u' is to use 'a' when pronounced, 'an' when
relaxed, as in: 'a unicorn' vs. 'an umbrella'; 'a half hour' vs. 'an
hour'.  In this case, the acronym is generally spoken you-tee-eff-eight,
so it gets 'a' since the 'u' was pronounced.

> +Read up to @var{size} bytes from memory character device @var{device}.
> +Bug: can screw up when the buffer contains invalid UTF-8 sequences,
> +NUL characters, after the ring buffer lost data, and when reading
> +stops because the size limit is reached.

Fair enough for 1.4 since we are in hard freeze; and hopefully 1.5 makes
life better.

Since the grammar fix is minor, feel free to keep this even if you respin:

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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