mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
qemu: Only build devstr when needs (attach PCI controller)
- qemudDomainAttachPciControllerDevice: Don't build "devstr" if "-device" of qemu is not available, as "devstr" will only be used by "qemuMonitorAddDevice", which depends on "-device" argument of qemu is supported. - "qemudDomainSaveImageOpen": Fix indent problem. * src/qemu/qemu_driver.c
This commit is contained in:
parent
e878514601
commit
981f7c8c9b
@ -6847,10 +6847,10 @@ static int qemudDomainSaveImageClose(int fd, pid_t read_pid, int *status)
|
|||||||
|
|
||||||
static int ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5)
|
static int ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5)
|
||||||
qemudDomainSaveImageOpen(struct qemud_driver *driver,
|
qemudDomainSaveImageOpen(struct qemud_driver *driver,
|
||||||
const char *path,
|
const char *path,
|
||||||
virDomainDefPtr *ret_def,
|
virDomainDefPtr *ret_def,
|
||||||
struct qemud_save_header *ret_header,
|
struct qemud_save_header *ret_header,
|
||||||
pid_t *ret_read_pid)
|
pid_t *ret_read_pid)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
pid_t read_pid = -1;
|
pid_t read_pid = -1;
|
||||||
@ -7905,11 +7905,11 @@ static int qemudDomainAttachPciControllerDevice(struct qemud_driver *driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (qemuAssignDeviceControllerAlias(controller) < 0)
|
if (qemuAssignDeviceControllerAlias(controller) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
|
||||||
|
|
||||||
if (!(devstr = qemuBuildControllerDevStr(controller))) {
|
if (!(devstr = qemuBuildControllerDevStr(controller))) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VIR_REALLOC_N(vm->def->controllers, vm->def->ncontrollers+1) < 0) {
|
if (VIR_REALLOC_N(vm->def->controllers, vm->def->ncontrollers+1) < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user