From 47b830370a09815c28ff16899aaf45a0f277a46f Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Mon, 11 Jan 2016 15:12:08 -0500 Subject: [PATCH] qemu: use enum when setting PCI "multi" value, not 0 or 1 Use the VIR_TRISTATE_SWITCH_* enums appropriately. No functional change. --- src/qemu/qemu_command.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 936a43e2f0..3c9caea49d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1,7 +1,7 @@ /* * qemu_command.c: QEMU command generation * - * Copyright (C) 2006-2015 Red Hat, Inc. + * Copyright (C) 2006-2016 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -2142,12 +2142,12 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def, memset(&tmp_addr, 0, sizeof(tmp_addr)); tmp_addr.slot = 0x1F; tmp_addr.function = 0; - tmp_addr.multi = 1; + tmp_addr.multi = VIR_TRISTATE_SWITCH_ON; if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr, flags, false, false) < 0) goto cleanup; tmp_addr.function = 3; - tmp_addr.multi = 0; + tmp_addr.multi = VIR_TRISTATE_SWITCH_ABSENT; if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr, flags, false, false) < 0) goto cleanup; @@ -2623,7 +2623,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def, addrs->lastaddr = addr; addrs->lastaddr.function = 0; - addrs->lastaddr.multi = 0; + addrs->lastaddr.multi = VIR_TRISTATE_SWITCH_ABSENT; } /* Finally we can reserve the slot+function */ if (virDomainPCIAddressReserveAddr(addrs, &addr, flags,