}
#endif
+#ifdef __linux__
int
virHostMemSetParameters(virTypedParameterPtr params G_GNUC_UNUSED,
int nparams G_GNUC_UNUSED,
unsigned int flags)
{
- virCheckFlags(0, -1);
-
-#ifdef __linux__
size_t i;
+ virCheckFlags(0, -1);
+
if (virTypedParamsValidate(params, nparams,
VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN,
VIR_TYPED_PARAM_UINT,
}
return 0;
+}
#else
+int
+virHostMemSetParameters(virTypedParameterPtr params G_GNUC_UNUSED,
+ int nparams G_GNUC_UNUSED,
+ unsigned int flags)
+{
+ virCheckFlags(0, -1);
+
virReportError(VIR_ERR_NO_SUPPORT, "%s",
_("node set memory parameters not implemented"
" on this platform"));
return -1;
-#endif
}
+#endif
#ifdef __linux__
static int
#endif
#define NODE_MEMORY_PARAMETERS_NUM 8
+#ifdef __linux__
int
virHostMemGetParameters(virTypedParameterPtr params G_GNUC_UNUSED,
int *nparams G_GNUC_UNUSED,
unsigned int flags)
{
- virCheckFlags(VIR_TYPED_PARAM_STRING_OKAY, -1);
-
-#ifdef __linux__
unsigned int pages_to_scan;
unsigned int sleep_millisecs;
unsigned int merge_across_nodes;
size_t i;
int ret;
+ virCheckFlags(VIR_TYPED_PARAM_STRING_OKAY, -1);
+
if ((*nparams) == 0) {
*nparams = NODE_MEMORY_PARAMETERS_NUM;
return 0;
}
return 0;
+}
#else
+int
+virHostMemGetParameters(virTypedParameterPtr params G_GNUC_UNUSED,
+ int *nparams G_GNUC_UNUSED,
+ unsigned int flags)
+{
+ virCheckFlags(VIR_TYPED_PARAM_STRING_OKAY, -1);
+
virReportError(VIR_ERR_NO_SUPPORT, "%s",
_("node get memory parameters not implemented"
" on this platform"));
return -1;
-#endif
}
+#endif
#ifdef WIN32