[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event |
Date: |
Fri, 24 Feb 2012 14:39:11 -0200 |
On Fri, 24 Feb 2012 10:01:00 -0600
Anthony Liguori <address@hidden> wrote:
> On 02/23/2012 08:08 AM, Markus Armbruster wrote:
> > Luiz Capitulino<address@hidden> writes:
> >
> >> On Thu, 23 Feb 2012 08:50:08 +0100
> >> Markus Armbruster<address@hidden> wrote:
> >>
> >>> Kevin Wolf<address@hidden> writes:
> >>>
> >>>> Am 17.02.2012 20:21, schrieb Luiz Capitulino:
> >>>>> It's emitted whenever the tray is moved by the guest or by HMP/QMP
> >>>>> commands.
> >>>>>
> >>>>> Signed-off-by: Luiz Capitulino<address@hidden>
> >>>>> ---
> >>>>> QMP/qmp-events.txt | 18 ++++++++++++++++++
> >>>>> block.c | 24 ++++++++++++++++++++++++
> >>>>> monitor.c | 3 +++
> >>>>> monitor.h | 1 +
> >>>>> 4 files changed, 46 insertions(+), 0 deletions(-)
> >>>>>
> >>>>> diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt
> >>>>> index 06cb404..9286af5 100644
> >>>>> --- a/QMP/qmp-events.txt
> >>>>> +++ b/QMP/qmp-events.txt
> >>>>> @@ -26,6 +26,24 @@ Example:
> >>>>> Note: If action is "stop", a STOP event will eventually follow the
> >>>>> BLOCK_IO_ERROR event.
> >>>>>
> >>>>> +DEVICE_TRAY_MOVED
> >>>>> +-----------------
> >>>>> +
> >>>>> +It's emitted whenever the tray of a removable device is moved by the
> >>>>> guest
> >>>>> +or by HMP/QMP commands.
> >>>>> +
> >>>>> +Data:
> >>>>> +
> >>>>> +- "device": device name (json-string)
> >>>>
> >>>> For me, a device name is something related to qdev. 'device' is a
> >>>> misnomer consistently used in all QMP commands so far and we can't fix
> >>>> it any more, but at least the documentation should clarify what is meant
> >>>> (that's for a follow-up patch).
> >>>
> >>> We can fix it if we really want to: rename, then add the old name as
> >>> alias for backward compatibility. Pick your favourite flavor of cruft.
> >>
> >> I like it, new events won't have the cruft.
> >
> > If we reserve "device" for device models, we need sensible names for
> > device backends. One each for block, net and char. There's some
> > precedence for "blockdev", "netdev", "chardev", but they contain "dev",
> > so there's still some overloading of the name "device". Better ideas?
>
> For 1.2 (when QOM is considered stable), this should become pathname. Given
> a
> path, a client can determine what the type of the object is (by reading the
> type
> property).
>
> In fact, I'd like to see all events have a pathname of origin. This would
> probably become part of the QMP protocol itself.
>
> This gives us a mechanism to subscribe to events from specific objects.
This is 1.2 material, right?
I'm asking because the conversion of events to the qapi is not too far away,
but I think that using QOM will somewhat deprecate the code you have in the
glib branch (besides having to wait for 1.2)?
- Re: [Qemu-devel] [PATCH 3/5] block: Don't call bdrv_eject() if the tray state didn't change, (continued)
- [Qemu-devel] [PATCH 4/5] ide: drop ide_tray_state_post_load(), Luiz Capitulino, 2012/02/17
- [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event, Luiz Capitulino, 2012/02/17
- Re: [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event, Markus Armbruster, 2012/02/20
- Re: [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event, Kevin Wolf, 2012/02/22
- Re: [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event, Markus Armbruster, 2012/02/23
- Re: [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event, Luiz Capitulino, 2012/02/23
- Re: [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event, Markus Armbruster, 2012/02/23
- Re: [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event, Anthony Liguori, 2012/02/24
- Re: [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event,
Luiz Capitulino <=
- Re: [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event, Anthony Liguori, 2012/02/24
- Re: [Qemu-devel] [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event, Luiz Capitulino, 2012/02/24
- [Qemu-devel] New QMP event interface (was Re: [PATCH 5/5] qmp: add DEVICE_TRAY_MOVED event), Anthony Liguori, 2012/02/24
- Re: [Qemu-devel] [PATCH v3 0/5]: QMP: add DEVICE_TRAY_MOVED event, Markus Armbruster, 2012/02/20