[PATCH v7 5/5] linux: Add mount_setattr

Adhemerval Zanella adhemerval.zanella@linaro.org
Mon Jul 11 12:49:46 GMT 2022



> On 11 Jul 2022, at 05:55, Florian Weimer <fweimer@redhat.com> wrote:
> 
> * Adhemerval Zanella via Libc-alpha:
> 
>> I am not sure how to handle it, glibc sys/mount.h should be a standalone
>> header.
> 
> Is it really necessary to keep <sys/mount.h> standalone?  It's not even
> a standard interface, and we don't have conform tests for this header as
> far as I can see.
> 
> So I think the usual __has_include approach should work here, too.

The main problem is sys/mount.h defines interfaces for syscall added
in multiple releases.  It means that depending of the kernel version
used by the compiler we will need to add some defines (for instance
fsconfig_command).  There is also a small difference where glibc
header define the MS_* constant as a unnamed enum (not sure if this
affects C++ mangling).

I know that using kernel headers simplify some support, specially sync
with newer releases; but this also adds more complexity where we need
to handle integration outside glibc project.


More information about the Libc-alpha mailing list