Re: [Qemu-devel] [PATCH 1/2] char: introduce a blocking version of qemu_chr_fe_write

2013-03-27 Thread Anthony Liguori
Peter Maydell writes: > On 27 March 2013 21:15, Anthony Liguori wrote: >> Applied. Thanks. > > Replied to wrong email by accident, or applied ignoring > the review comments? I interpreted your comment as a suggestion. I'm not a fan of while (true) loops so I left it as is. Since it's a prett

Re: [Qemu-devel] [PATCH 1/2] char: introduce a blocking version of qemu_chr_fe_write

2013-03-27 Thread Peter Maydell
On 27 March 2013 21:15, Anthony Liguori wrote: > Applied. Thanks. Replied to wrong email by accident, or applied ignoring the review comments? -- PMM

Re: [Qemu-devel] [PATCH 1/2] char: introduce a blocking version of qemu_chr_fe_write

2013-03-27 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH 1/2] char: introduce a blocking version of qemu_chr_fe_write

2013-03-27 Thread Wenchao Xia
于 2013-3-26 23:21, Peter Maydell 写道: On 26 March 2013 15:11, Anthony Liguori wrote: +int qemu_chr_fe_write_all(CharDriverState *s, const uint8_t *buf, int len) +{ +int offset = 0; +int res; + +while (offset < len) { +do { +res = s->chr_write(s, buf + offset, len

Re: [Qemu-devel] [PATCH 1/2] char: introduce a blocking version of qemu_chr_fe_write

2013-03-26 Thread Peter Maydell
On 26 March 2013 15:11, Anthony Liguori wrote: > +int qemu_chr_fe_write_all(CharDriverState *s, const uint8_t *buf, int len) > +{ > +int offset = 0; > +int res; > + > +while (offset < len) { > +do { > +res = s->chr_write(s, buf + offset, len - offset); > +

[Qemu-devel] [PATCH 1/2] char: introduce a blocking version of qemu_chr_fe_write

2013-03-26 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- include/char/char.h | 15 +++ qemu-char.c | 27 +++ 2 files changed, 42 insertions(+) diff --git a/include/char/char.h b/include/char/char.h index 0326b2a..5c3a7a5 100644 --- a/include/char/char.h +++ b/include/char/c