diff mbox series

Linux: add ST_NOSYMFOLLOW

Message ID 20230922001427.413152-1-kolyshkin@gmail.com
State New
Headers show
Series Linux: add ST_NOSYMFOLLOW | expand

Commit Message

Kir Kolyshkin Sept. 22, 2023, 12:14 a.m. UTC
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.
---
 sysdeps/unix/sysv/linux/bits/statvfs.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

DJ Delorie Sept. 22, 2023, 7:55 p.m. UTC | #1
Kir Kolyshkin <kolyshkin@gmail.com> writes:
> -  ST_RELATIME = 4096		/* Update atime relative to mtime/ctime.  */
> +  ST_RELATIME = 4096,		/* Update atime relative to mtime/ctime.  */

Comma, ok.

>  # define ST_RELATIME	ST_RELATIME
> +  ST_NOSYMFOLLOW = 8192,	/* Do not follow symlinks.  */
> +# define ST_NOSYMFOLLOW	ST_NOSYMFOLLOW

Matches the kernel, Ok.

LGTM
Reviewed-by: DJ Delorie <dj@redhat.com>

Do you need someone to commit this for you?
Alexander Monakov Sept. 24, 2023, 11:52 a.m. UTC | #2
On Fri, 22 Sep 2023, DJ Delorie wrote:

> Kir Kolyshkin <kolyshkin@gmail.com> writes:
> > -  ST_RELATIME = 4096		/* Update atime relative to mtime/ctime.  */
> > +  ST_RELATIME = 4096,		/* Update atime relative to mtime/ctime.  */
> 
> Comma, ok.
> 
> >  # define ST_RELATIME	ST_RELATIME
> > +  ST_NOSYMFOLLOW = 8192,	/* Do not follow symlinks.  */
> > +# define ST_NOSYMFOLLOW	ST_NOSYMFOLLOW
> 
> Matches the kernel, Ok.

It adds a trailing enum comma (invalid in C prior to C99 and C++ prior to C++11)
while it was correctly omitted before.

Alexander
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/bits/statvfs.h b/sysdeps/unix/sysv/linux/bits/statvfs.h
index cf98460e00..7195fdf874 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.  */
 };