mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
c34efecedd
commit
163f384752
7 changed files with 9 additions and 7 deletions
|
@ -176,7 +176,7 @@ struct DeviceState {
|
|||
Object parent_obj;
|
||||
/*< public >*/
|
||||
|
||||
const char *id;
|
||||
char *id;
|
||||
char *canonical_path;
|
||||
bool realized;
|
||||
bool pending_deleted_event;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue