mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
96cc181089
commit
ccb63de38e
2 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue