On 10/21/2012 10:47 AM, Lei Li wrote: > Signed-off-by: Lei Li <[email protected]> > --- > qemu-char.c | 72 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 72 insertions(+), 0 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index b082bae..b174da1 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -2588,6 +2588,78 @@ size_t qemu_chr_mem_osize(const CharDriverState *chr) > return d->outbuf_size; > } > > +/*********************************************************/ > +/*CircularMemoryr chardev*/
s/CircularMemoryr/CircularMemory/
> +static int cirmem_chr_write(CharDriverState *chr, const uint8_t *buf, int
> len)
> +{
> + CirMemCharDriver *d = chr->opaque;
> + int i;
> +
> + if (len < 0) {
> + return -1;
> + }
> +
> + /* The size should be a power of 2. */
Shouldn't you enforce that, then?
--
Eric Blake [email protected] +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
