On 24.07.2014 08:41, Peter Krempa wrote:
> On 07/23/14 21:06, Daniel P. Berrange wrote:
>> On Wed, Jul 23, 2014 at 05:37:17PM +0200, Michal Privoznik wrote:
>>> +int
>>> +virFileFindHugeTLBFS(virHugeTLBFSPtr *ret_fs,
>>> + size_t *ret_nfs)
>>> +{
>>> +int ret = -1;
>>> +
On 07/23/14 21:06, Daniel P. Berrange wrote:
> On Wed, Jul 23, 2014 at 05:37:17PM +0200, Michal Privoznik wrote:
>> +int
>> +virFileFindHugeTLBFS(virHugeTLBFSPtr *ret_fs,
>> + size_t *ret_nfs)
>> +{
>> +int ret = -1;
>> +FILE *f = NULL;
>> +struct mntent mb;
>> +
On Wed, Jul 23, 2014 at 05:37:17PM +0200, Michal Privoznik wrote:
> +int
> +virFileFindHugeTLBFS(virHugeTLBFSPtr *ret_fs,
> + size_t *ret_nfs)
> +{
> +int ret = -1;
> +FILE *f = NULL;
> +struct mntent mb;
> +char mntbuf[1024];
> +virHugeTLBFSPtr fs = NULL;
>
This should iterate over mount tab and search for hugetlbfs among with
looking for the default value of huge pages.
Signed-off-by: Michal Privoznik
---
src/libvirt_private.syms | 2 +
src/util/virfile.c | 151 ++-
src/util/virfile.h | 12