On 06/23/14 13:49, Michal Privoznik wrote: > On 23.06.2014 09:29, Peter Krempa wrote: >> The hugepage sizing and counting code gathers the information from sysfs >> and thus isn't portable. Stub it out for non-Linux so that we can report >> a better error. This patch also avoids calling sysinfo() on Mingw where >> it isn't supported. >> --- >> src/util/virnuma.c | 46 ++++++++++++++++++++++++++++++++++++++-------- >> 1 file changed, 38 insertions(+), 8 deletions(-) >>
>> +int
>> +virNumaGetPages(int node ATTRIBUTE_UNUSED,
>> + unsigned int **pages_size ATTRIBUTE_UNUSED,
>> + unsigned int **pages_avail ATTRIBUTE_UNUSED,
>> + unsigned int **pages_free ATTRIBUTE_UNUSED,
>> + size_t *npages ATTRIBUTE_UNUSED)
>> +{
>> + virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
>> + _("system page size are not supported for this
>> platform"));
>> + return -1;
>> +}
>> +#endif /* #if WITH_LINUX */
>>
>
> These two APIs are intended to get info for all page sizes, not only the
> ordinary system ones.
>
> ACK with the error message changed to reflect that.
I'm going with "page info is not supported on this platform" and
VIR_ERR_OPERATION_UNSUPPORTED code.
>
> Michal
>
And pushing shortly.
Peter
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
