qdev: add user-specified identifier to devices.
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 15 Jul 2009 11:43:34 +0000 (13:43 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 16 Jul 2009 22:28:53 +0000 (17:28 -0500)
commitc000f09577939ebfc75eb67c72a54a1a384d1f3f
tree58e9685597139fe064b1a20f39bdb81f4d0915bc
parent1d02ebd0bf11ef917158375c6b012604063f6fc6
qdev: add user-specified identifier to devices.

Add id field to DeviceState.  Make "info qtree" print it.

This helps users and management apps identifying devices in monitor
output, which is especially useful with otherwise identical devices
such as two virtio disks.

This patch doesn't add a way to set the id, followup patches will do.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/qdev.c
hw/qdev.h