[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command

From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command
Date: Wed, 09 Mar 2011 15:58:47 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.7

On 03/09/2011 03:48 PM, Anthony Liguori wrote:
+[ 'put-event', {'tag': 'int'}, {}, 'none' ]

Why is tag an int?

It's a handle so the type doesn't matter as long as I can make sure values are unique. ints are easier to work with because they don't require memory allocation.

I think it's nicer for the client to use a string. Instead of a global ID allocator, it can use unique IDs or unique prefixes + local IDs. Should also aid a little in debugging.

  don't we use strings for command ids and similar?

id's can be any valid JSON value.

But a handle is not the same thing as an id.

Why not?

I hope handles are client-provided?

Also could be better named, disconnect-event or unlisten-event.

I was going for symmetry with the signal accessors which are typically in the format 'get-block-io-error-event'.

Maybe it would be better to do 'connect-block-io-error-event' and 'disconnect-event'?


But I'm confused, do we have a per-event command on the wire? Or just C stubs?

error compiling committee.c: too many arguments to function

reply via email to

[Prev in Thread] Current Thread [Next in Thread]