mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
virmdev: fix build on non-Linux
- Make virMediatedDeviceNew() stub args match its prototype - Fix typo: virRerportError -> virReportError - Move MDEV_SYSFS_DEVICES definition out of the #ifdef __linux__ block so we don't have to stub virMediatedDeviceGetSysfsPath()
This commit is contained in:
parent
5efdc1a6e2
commit
8ffffae97f
@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
|
||||||
|
#define MDEV_SYSFS_DEVICES "/sys/bus/mdev/devices/"
|
||||||
|
|
||||||
VIR_LOG_INIT("util.mdev");
|
VIR_LOG_INIT("util.mdev");
|
||||||
|
|
||||||
struct _virMediatedDevice {
|
struct _virMediatedDevice {
|
||||||
@ -68,7 +70,6 @@ virMediatedOnceInit(void)
|
|||||||
VIR_ONCE_GLOBAL_INIT(virMediated)
|
VIR_ONCE_GLOBAL_INIT(virMediated)
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
# define MDEV_SYSFS_DEVICES "/sys/bus/mdev/devices/"
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virMediatedDeviceGetSysfsDeviceAPI(virMediatedDevicePtr dev,
|
virMediatedDeviceGetSysfsDeviceAPI(virMediatedDevicePtr dev,
|
||||||
@ -173,12 +174,12 @@ virMediatedDeviceNew(const char *uuidstr, virMediatedDeviceModelType model)
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
virMediatedDevicePtr
|
virMediatedDevicePtr
|
||||||
virMediatedDeviceNew(virPCIDeviceAddressPtr pciaddr ATTRIBUTE_UNUSED,
|
virMediatedDeviceNew(const char *uuidstr ATTRIBUTE_UNUSED,
|
||||||
const char *uuidstr ATTRIBUTE_UNUSED)
|
virMediatedDeviceModelType model ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
virRerportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("mediated devices are not supported on non-linux "
|
_("mediated devices are not supported on non-linux "
|
||||||
"platforms"));
|
"platforms"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user