summaryrefslogtreecommitdiffstats
path: root/hw/qdev.h
diff options
context:
space:
mode:
authorGerd Hoffmann2009-07-15 13:43:34 +0200
committerAnthony Liguori2009-07-17 00:28:53 +0200
commitccb63de38e63bd8cdcd3db7aeaebc8a34a02ded8 (patch)
tree58e9685597139fe064b1a20f39bdb81f4d0915bc /hw/qdev.h
parentqdev/compat: add pc-0.10 machine type. (diff)
downloadqemu-ccb63de38e63bd8cdcd3db7aeaebc8a34a02ded8.tar.gz
qemu-ccb63de38e63bd8cdcd3db7aeaebc8a34a02ded8.tar.xz
qemu-ccb63de38e63bd8cdcd3db7aeaebc8a34a02ded8.zip
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>
Diffstat (limited to 'hw/qdev.h')
-rw-r--r--hw/qdev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/qdev.h b/hw/qdev.h
index 73d19fa699..11744fa539 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -19,6 +19,7 @@ typedef struct BusInfo BusInfo;
/* This structure should not be accessed directly. We declare it here
so that it can be embedded in individual device state structures. */
struct DeviceState {
+ char *id;
DeviceInfo *info;
BusState *parent_bus;
int num_gpio_out;