Eric Blake <ebl...@redhat.com> 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 <arm...@redhat.com> >> --- >> 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 <ebl...@redhat.com> I agree we should tackle our Unicode issues for 1.5.