[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: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH for-1.4 12/12] QAPI QMP HMP: Fix and improve memchar-read/-write docs |
Date: |
Wed, 06 Feb 2013 08:20:09 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Eric Blake <address@hidden> writes:
> 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.
Thanks much for your attention to detail. Will correct on respin.
>> +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>
I agree we should tackle our Unicode issues for 1.5.
- Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write, (continued)
[Qemu-devel] [PATCH for-1.4 08/12] qemu-char: Drop undocumented chardev "memory" compatibility syntax, Markus Armbruster, 2013/02/05
[Qemu-devel] [PATCH for-1.4 09/12] qemu-char: Redo chardev "memory" size configuration, Markus Armbruster, 2013/02/05
[Qemu-devel] [PATCH for-1.4 12/12] QAPI QMP HMP: Fix and improve memchar-read/-write docs, Markus Armbruster, 2013/02/05
[Qemu-devel] [PATCH for-1.4 11/12] qmp: Use generic errors in memchar-read, memchar-write, Markus Armbruster, 2013/02/05
[Qemu-devel] [PATCH for-1.4 10/12] qemu-char: General chardev "memory" code cleanup, Markus Armbruster, 2013/02/05
Re: [Qemu-devel] [PATCH for-1.4 00/12] Fix memchar-read/-write before API gets released, Luiz Capitulino, 2013/02/06
Re: [Qemu-devel] [PATCH for-1.4 00/12] Fix memchar-read/-write before API gets released, Anthony Liguori, 2013/02/06