- Make virMediatedDeviceNew() stub args match its prototype - Fix typo: virRerportError -> virReportError - Move virMediatedDeviceGetSysfsPath() into #ifdef __linux__ block as it uses MDEV_SYSFS_DEVICES, and a stub for it --- I'm not pushing this one too, until I get a completely clean build. src/util/virmdev.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/util/virmdev.c b/src/util/virmdev.c index e924af3c1..e49ea18e5 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -170,15 +170,34 @@ virMediatedDeviceNew(const char *uuidstr, virMediatedDeviceModelType model) return ret; } + +char * +virMediatedDeviceGetSysfsPath(const char *uuidstr) +{ + char *ret = NULL; + + ignore_value(virAsprintf(&ret, MDEV_SYSFS_DEVICES "%s", uuidstr)); + return ret; +} + #else virMediatedDevicePtr -virMediatedDeviceNew(virPCIDeviceAddressPtr pciaddr ATTRIBUTE_UNUSED, - const char *uuidstr ATTRIBUTE_UNUSED) +virMediatedDeviceNew(const char *uuidstr ATTRIBUTE_UNUSED, + virMediatedDeviceModelType model ATTRIBUTE_UNUSED) { - virRerportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("mediated devices are not supported on non-linux " - "platforms")); + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("mediated devices are not supported on non-linux " + "platforms")); + return NULL; +} + +char * +virMediatedDeviceGetSysfsPath(const char *uuidstr ATTRIBUTE_UNUSED) +{ + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("mediated devices are not supported on non-linux " + "platforms")); return NULL; } @@ -423,16 +442,6 @@ virMediatedDeviceIsUsed(virMediatedDevicePtr dev, } -char * -virMediatedDeviceGetSysfsPath(const char *uuidstr) -{ - char *ret = NULL; - - ignore_value(virAsprintf(&ret, MDEV_SYSFS_DEVICES "%s", uuidstr)); - return ret; -} - - int virMediatedDeviceListMarkDevices(virMediatedDeviceListPtr dst, virMediatedDeviceListPtr src, -- 2.11.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list