qemu: simplify qemuProcessSetupRawIO

Remove the now unused 'driver' parameter, as well as the pointless
if (ret == 0) comparison which is always true after removing the
cleanup label.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Ján Tomko 2022-01-13 18:26:14 +01:00
parent 8120021860
commit 6ba2643257
1 changed files with 3 additions and 5 deletions

View File

@ -5022,8 +5022,7 @@ qemuProcessSetupGraphics(virQEMUDriver *driver,
static int
qemuProcessSetupRawIO(virQEMUDriver *driver G_GNUC_UNUSED,
virDomainObj *vm,
qemuProcessSetupRawIO(virDomainObj *vm,
virCommand *cmd G_GNUC_UNUSED)
{
bool rawio = false;
@ -5062,8 +5061,7 @@ qemuProcessSetupRawIO(virQEMUDriver *driver G_GNUC_UNUSED,
if (rawio) {
#ifdef CAP_SYS_RAWIO
if (ret == 0)
virCommandAllowCap(cmd, CAP_SYS_RAWIO);
virCommandAllowCap(cmd, CAP_SYS_RAWIO);
#else
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Raw I/O is not supported on this platform"));
@ -7423,7 +7421,7 @@ qemuProcessLaunch(virConnectPtr conn,
goto cleanup;
VIR_DEBUG("Setting up raw IO");
if (qemuProcessSetupRawIO(driver, vm, cmd) < 0)
if (qemuProcessSetupRawIO(vm, cmd) < 0)
goto cleanup;
virCommandSetPreExecHook(cmd, qemuProcessHook, &hookData);