Message ID | 20230927223712.633536-1-kolyshkin@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v3] Linux: add ST_NOSYMFOLLOW | expand |
On 27/09/23 19:37, Kir Kolyshkin wrote: > Linux v5.10 added a mount option MS_NOSYMFOLLOW, which was added to > glibc in commit 0ca21427d950755b. > > Add the corresponding statfs/statvfs flag bit, ST_NOSYMFOLLOW. > > Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> LGTM, thanks. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> > --- > sysdeps/unix/sysv/linux/bits/statvfs.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/sysdeps/unix/sysv/linux/bits/statvfs.h b/sysdeps/unix/sysv/linux/bits/statvfs.h > index cf98460e00..ed965f287f 100644 > --- a/sysdeps/unix/sysv/linux/bits/statvfs.h > +++ b/sysdeps/unix/sysv/linux/bits/statvfs.h > @@ -105,7 +105,9 @@ enum > # define ST_NOATIME ST_NOATIME > ST_NODIRATIME = 2048, /* Do not update directory access times. */ > # define ST_NODIRATIME ST_NODIRATIME > - ST_RELATIME = 4096 /* Update atime relative to mtime/ctime. */ > + ST_RELATIME = 4096, /* Update atime relative to mtime/ctime. */ > # define ST_RELATIME ST_RELATIME > + ST_NOSYMFOLLOW = 8192 /* Do not follow symlinks. */ > +# define ST_NOSYMFOLLOW ST_NOSYMFOLLOW > #endif /* Use GNU. */ > };
diff --git a/sysdeps/unix/sysv/linux/bits/statvfs.h b/sysdeps/unix/sysv/linux/bits/statvfs.h index cf98460e00..ed965f287f 100644 --- a/sysdeps/unix/sysv/linux/bits/statvfs.h +++ b/sysdeps/unix/sysv/linux/bits/statvfs.h @@ -105,7 +105,9 @@ enum # define ST_NOATIME ST_NOATIME ST_NODIRATIME = 2048, /* Do not update directory access times. */ # define ST_NODIRATIME ST_NODIRATIME - ST_RELATIME = 4096 /* Update atime relative to mtime/ctime. */ + ST_RELATIME = 4096, /* Update atime relative to mtime/ctime. */ # define ST_RELATIME ST_RELATIME + ST_NOSYMFOLLOW = 8192 /* Do not follow symlinks. */ +# define ST_NOSYMFOLLOW ST_NOSYMFOLLOW #endif /* Use GNU. */ };
Linux v5.10 added a mount option MS_NOSYMFOLLOW, which was added to glibc in commit 0ca21427d950755b. Add the corresponding statfs/statvfs flag bit, ST_NOSYMFOLLOW. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> --- sysdeps/unix/sysv/linux/bits/statvfs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)