qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Chris Wright <chrisw@redhat.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] KVM call minutes for Feb 15
Date: Wed, 16 Feb 2011 12:24:41 +0200	[thread overview]
Message-ID: <4D5BA5E9.90307@redhat.com> (raw)
In-Reply-To: <4D5B0889.4030303@codemonkey.ws>

On 02/16/2011 01:13 AM, Anthony Liguori wrote:
> On 02/15/2011 10:26 AM, Chris Wright wrote:
>> QAPI and QMP
>> - Anthony adding a new wiki page to describe all of this
>
> http://wiki.qemu.org/Features/QAPI
>

   [ 'change', {'device': 'str', 'target': 'str'}, {'arg': 'str'}, 'none' ]
     ->
   void qmp_change(const char *device, const char *target, bool has_arg, 
const char *arg, Error **errp);

AFAICT a json-string allows embedded NULs ('\0000').  There translate to 
UTF-8 as '\0', terminating your char *s.  Either we use some 
length/pointer structure, or the parser has to look for them and kill 
them, and we have to specify them as verboten.

BlockDeviceInfo *qmp_query_block_device_info(const char *device, Error **errp)
{
     BlockDeviceInfo *info;
     BlockDriverState *bs;
     Error *local_err = NULL;

     bs = bdrv_find(device,&local_err);
     if (local_err) {
         error_propagate(errp, local_err);
         return NULL;
     }

     info->file = qemu_strdup(bs->filename);
     info->ro = bs->readonly;
     info->drv = qemu_strdup(bs->drv);
     info->encrypted = bs->encrypted;
     if (bs->backing_file[0]) {
         info->has_backing_file = true;
         info->backing_file = qemu_strdup(info->backing_file);
     }

     return info;
}


So, info and all its pointer-typed members are required to be 
qemu_free() compatible, with just a single pointer pointing to an 
object, and generated code will qemu_free() everything?

Recommend translating '-' in identifiers to '_' so we can use '-' in the 
schema as a word separator.

-- 

error compiling committee.c: too many arguments to function

  reply	other threads:[~2011-02-16 10:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-15 16:26 [Qemu-devel] KVM call minutes for Feb 15 Chris Wright
2011-02-15 23:13 ` Anthony Liguori
2011-02-16 10:24   ` Avi Kivity [this message]
2011-02-16 13:34     ` Anthony Liguori
2011-02-17  9:26       ` Avi Kivity
2011-02-17 12:12         ` Anthony Liguori
2011-02-17 12:23           ` Avi Kivity
2011-02-17 13:10             ` Anthony Liguori
2011-02-17 13:25               ` Avi Kivity
2011-02-17 13:37                 ` Anthony Liguori
2011-02-17 13:59                   ` Peter Maydell
2011-02-17 14:01                     ` Anthony Liguori
2011-02-17 14:06                   ` Avi Kivity
2011-02-17 13:37                 ` Anthony Liguori
2011-02-16 14:39   ` Amit Shah
2011-02-16 14:41     ` Anthony Liguori
2011-02-17 12:42       ` Amit Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D5BA5E9.90307@redhat.com \
    --to=avi@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=chrisw@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).