mirror of https://gitee.com/openkylin/libvirt.git
util: Avoid needless preprocessor conditionals in virresctrl
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
5a0a5f7fb5
commit
3593d36c33
|
@ -380,8 +380,6 @@ virResctrlInfoIsEmpty(virResctrlInfoPtr resctrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef __linux__
|
|
||||||
|
|
||||||
int
|
int
|
||||||
virResctrlGetInfo(virResctrlInfoPtr resctrl)
|
virResctrlGetInfo(virResctrlInfoPtr resctrl)
|
||||||
{
|
{
|
||||||
|
@ -512,18 +510,6 @@ virResctrlGetInfo(virResctrlInfoPtr resctrl)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* ! __linux__ */
|
|
||||||
|
|
||||||
int
|
|
||||||
virResctrlGetInfo(virResctrlInfoPtr resctrl ATTRIBUTE_UNUSED)
|
|
||||||
{
|
|
||||||
virReportSystemError(ENOSYS, "%s",
|
|
||||||
_("Cache tune not supported on this platform"));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* ! __linux__ */
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
virResctrlInfoGetCache(virResctrlInfoPtr resctrl,
|
virResctrlInfoGetCache(virResctrlInfoPtr resctrl,
|
||||||
|
@ -1089,8 +1075,6 @@ virResctrlAllocGetDefault(virResctrlInfoPtr resctrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef __linux__
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
virResctrlAllocSubtractPerType(virResctrlAllocPerTypePtr dst,
|
virResctrlAllocSubtractPerType(virResctrlAllocPerTypePtr dst,
|
||||||
virResctrlAllocPerTypePtr src)
|
virResctrlAllocPerTypePtr src)
|
||||||
|
@ -1246,18 +1230,6 @@ virResctrlAllocGetUnused(virResctrlInfoPtr resctrl)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* ! __linux__ */
|
|
||||||
|
|
||||||
virResctrlAllocPtr
|
|
||||||
virResctrlAllocGetUnused(virResctrlInfoPtr resctrl ATTRIBUTE_UNUSED)
|
|
||||||
{
|
|
||||||
virReportSystemError(ENOSYS, "%s",
|
|
||||||
_("Cache tune not supported on this platform"));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* ! __linux__ */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Given the information about requested allocation type `a_type`, the host
|
* Given the information about requested allocation type `a_type`, the host
|
||||||
|
|
Loading…
Reference in New Issue