mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemuMonitorJSONHandleTrayChange: Properly handle if 'devAlias' is missing
While qemu is still reporting the 'device' field in the tray even the code was not ready for the possibility of it missing. Fix the condition for clearing 'devAlias' if qemu doesn't report the 'device' field. Signed-off-by: Sergey Mironov <mironov@fintech.ru>
This commit is contained in:
parent
25685ebe7c
commit
8eb09a2bb9
@ -934,7 +934,7 @@ qemuMonitorJSONHandleTrayChange(qemuMonitor *mon,
|
||||
int reason;
|
||||
|
||||
/* drive alias is always reported but empty for -blockdev */
|
||||
if (*devAlias == '\0')
|
||||
if (devAlias && *devAlias == '\0')
|
||||
devAlias = NULL;
|
||||
|
||||
if (!devAlias && !devid) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user