These functions do not change any of the passed hostdevs. They just read them. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/util/virhostdev.c | 6 +++--- src/util/virhostdev.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 41fcab7222..90967b7c7a 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -354,7 +354,7 @@ virHostdevNetDevice(virDomainHostdevDefPtr hostdev, static bool -virHostdevIsPCINetDevice(virDomainHostdevDefPtr hostdev) +virHostdevIsPCINetDevice(const virDomainHostdevDef *hostdev) { return hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI && @@ -369,7 +369,7 @@ virHostdevIsPCINetDevice(virDomainHostdevDefPtr hostdev) * Returns true if @hostdev is a SCSI device, false otherwise. */ bool -virHostdevIsSCSIDevice(virDomainHostdevDefPtr hostdev) +virHostdevIsSCSIDevice(const virDomainHostdevDef *hostdev) { return hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI; @@ -383,7 +383,7 @@ virHostdevIsSCSIDevice(virDomainHostdevDefPtr hostdev) * Returns true if @hostdev is a Mediated device, false otherwise. */ bool -virHostdevIsMdevDevice(virDomainHostdevDefPtr hostdev) +virHostdevIsMdevDevice(const virDomainHostdevDef *hostdev) { return hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV; diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h index 88501e2743..8d7b8c3284 100644 --- a/src/util/virhostdev.h +++ b/src/util/virhostdev.h @@ -185,10 +185,10 @@ virHostdevReAttachDomainDevices(virHostdevManagerPtr mgr, const char *oldStateDir) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); bool -virHostdevIsSCSIDevice(virDomainHostdevDefPtr hostdev) +virHostdevIsSCSIDevice(const virDomainHostdevDef *hostdev) ATTRIBUTE_NONNULL(1); bool -virHostdevIsMdevDevice(virDomainHostdevDefPtr hostdev) +virHostdevIsMdevDevice(const virDomainHostdevDef *hostdev) ATTRIBUTE_NONNULL(1); /* functions used by NodeDevDetach/Reattach/Reset */ -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list