mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
qemu: Add missing goto on rawio
Commit id '9a2f36ec' added a build conditional of CAP_SYS_RAWIO in order to determine whether or not a disk definition using rawio should be allowed on platforms without CAP_SYS_RAWIO. If one was found, virReportError was used but the code didn't goto cleanup. This patch adds the goto.
This commit is contained in:
parent
a3bcd86317
commit
8921d48868
@ -4357,13 +4357,15 @@ int qemuProcessStart(virConnectPtr conn,
|
|||||||
virDomainDeviceDef dev;
|
virDomainDeviceDef dev;
|
||||||
virDomainDiskDefPtr disk = vm->def->disks[i];
|
virDomainDiskDefPtr disk = vm->def->disks[i];
|
||||||
|
|
||||||
if (vm->def->disks[i]->rawio == 1)
|
if (vm->def->disks[i]->rawio == 1) {
|
||||||
#ifdef CAP_SYS_RAWIO
|
#ifdef CAP_SYS_RAWIO
|
||||||
virCommandAllowCap(cmd, CAP_SYS_RAWIO);
|
virCommandAllowCap(cmd, CAP_SYS_RAWIO);
|
||||||
#else
|
#else
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("Raw I/O is not supported on this platform"));
|
_("Raw I/O is not supported on this platform"));
|
||||||
|
goto cleanup;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
dev.type = VIR_DOMAIN_DEVICE_DISK;
|
dev.type = VIR_DOMAIN_DEVICE_DISK;
|
||||||
dev.data.disk = disk;
|
dev.data.disk = disk;
|
||||||
|
Loading…
Reference in New Issue
Block a user