Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] [PATCH] Use getmntent_r(3) to parse /proc/mounts lines
From: Bert Wesarg (bert.wesarg_at_[hidden])
Date: 2010-03-11 18:37:09

On Fri, Mar 12, 2010 at 00:18, Bert Wesarg <bert.wesarg_at_[hidden]> wrote:
> On Fri, Mar 12, 2010 at 00:14, Bert Wesarg <bert.wesarg_at_[hidden]> wrote:
>> On Fri, Mar 12, 2010 at 00:03, Brice Goglin <Brice.Goglin_at_[hidden]> wrote:
>>> Did you actually test this ? The way I am reading the manpage is that
>>> you need to open with setmntent and close with endmntent.
>> I have read the man page, but only about getmntent, and than read the
>> source code for getmntent from glibc.
>> So yes, it is better to use setmntent/endmntent to be conform.
> Ups, what about the fsroot_fd now? I think this has something to do if
> /proc and /sys are not mounted at the root, for example in test mode,
> right?

I'm right. The only way out I see is to step aside from openat and use
string operations to for this.

Also, I remember that in PLPA we only allowed to set the FSROOT with
an environment variable in DEBUG mode.

I see that this would limit the test suit for debug builds, but I also
don't see a need for a user to set the FSROOT in a production system

> Bert