Re: [libvirt] [PATCH v2 1/6] Introduce virFileFindHugeTLBFS

2014-07-24 Thread Michal Privoznik
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; >>> +

Re: [libvirt] [PATCH v2 1/6] Introduce virFileFindHugeTLBFS

2014-07-23 Thread Peter Krempa
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; >> +

Re: [libvirt] [PATCH v2 1/6] Introduce virFileFindHugeTLBFS

2014-07-23 Thread Daniel P. Berrange
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; >

[libvirt] [PATCH v2 1/6] Introduce virFileFindHugeTLBFS

2014-07-23 Thread Michal Privoznik
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