qemuDiskConfigBlkdeviotuneEnabled: Make 'disk' argument const

The function doesn't modify it. Fix the argument declaration so that the
function can be used in a context where we have a 'const' disk
definition.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-05-25 16:52:36 +02:00
parent cec5a9989c
commit 6d6a87f229
2 changed files with 2 additions and 2 deletions

View File

@ -1550,7 +1550,7 @@ qemuBuildChardevCommand(virCommand *cmd,
bool bool
qemuDiskConfigBlkdeviotuneEnabled(virDomainDiskDef *disk) qemuDiskConfigBlkdeviotuneEnabled(const virDomainDiskDef *disk)
{ {
return !!disk->blkdeviotune.group_name || return !!disk->blkdeviotune.group_name ||
virDomainBlockIoTuneInfoHasAny(&disk->blkdeviotune); virDomainBlockIoTuneInfoHasAny(&disk->blkdeviotune);

View File

@ -208,7 +208,7 @@ qemuBuildZPCIDevProps(virDomainDeviceInfo *dev);
int qemuNetworkPrepareDevices(virDomainDef *def); int qemuNetworkPrepareDevices(virDomainDef *def);
bool bool
qemuDiskConfigBlkdeviotuneEnabled(virDomainDiskDef *disk); qemuDiskConfigBlkdeviotuneEnabled(const virDomainDiskDef *disk);
virJSONValue *qemuBuildHotpluggableCPUProps(const virDomainVcpuDef *vcpu) virJSONValue *qemuBuildHotpluggableCPUProps(const virDomainVcpuDef *vcpu)
ATTRIBUTE_NONNULL(1); ATTRIBUTE_NONNULL(1);