qdev: Make DeviceState.id independent of QemuOpts
DeviceState.id is a pointer to a string that is stored in the QemuOpts object DeviceState.opts and freed together with it. We want to create devices without going through QemuOpts in the future, so make this a separately allocated string. Signed-off-by:Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20211008133442.141332-9-kwolf@redhat.com> Reviewed-by:
Damien Hedde <damien.hedde@greensocs.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Tested-by:
Peter Krempa <pkrempa@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
Showing
- hw/arm/virt.c 1 addition, 1 deletionhw/arm/virt.c
- hw/core/qdev.c 1 addition, 0 deletionshw/core/qdev.c
- hw/pci-bridge/pci_expander_bridge.c 1 addition, 1 deletionhw/pci-bridge/pci_expander_bridge.c
- hw/ppc/e500.c 1 addition, 1 deletionhw/ppc/e500.c
- include/hw/qdev-core.h 1 addition, 1 deletioninclude/hw/qdev-core.h
- include/monitor/qdev.h 1 addition, 1 deletioninclude/monitor/qdev.h
- softmmu/qdev-monitor.c 3 additions, 2 deletionssoftmmu/qdev-monitor.c
Loading
Please register or sign in to comment