Amos Kong <ak...@redhat.com> writes: > On Mon, Jun 24, 2013 at 02:34:59PM +0800, Amos Kong wrote: >> netclient 'name' entry in event is useful for management to know >> which device is changed. n->netclient_name is not always set. >> This patch changes to use nc->name. If we don't assign 'id', >> qemu will set a generated name to nc->name. > > > IRC: <mst> akong, what do other events include? name or id? > > I just checked QMP/qmp-event.txt, they all use 'device name'. > (eg: BLOCK_IO_ERROR, DEVICE_DELETED, DEVICE_TRAY_MOVED, BLOCK_JOB_*) > > If we assign 'id' for -device, device name will be set to id. > Otherwise, a generated device name will set to some device.
DEVICE_DELETED uses "device" (the qdev ID) and "path" (the QOM path). For reasons I don't understand, it sets "path" only when the device has no qdev ID. That should be cleaned up.