* Add AT_HANDLE_FID from Linux 6.5 to bits/fcntl-linux.h
@ 2023-10-13 23:26 Joseph Myers
2023-10-14 8:45 ` Florian Weimer
0 siblings, 1 reply; 2+ messages in thread
From: Joseph Myers @ 2023-10-13 23:26 UTC (permalink / raw)
To: libc-alpha
Linux 6.5 adds a constant AT_HANDLE_FID; add it to glibc. Because
this is a flag for the function name_to_handle_at declared in
bits/fcntl-linux.h, put the flag there rather than alongside other
AT_* flags in (OS-independent) fcntl.h.
Tested for x86_64.
diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
index df378c7b89..dd9d9baf09 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
@@ -368,6 +368,17 @@ struct file_handle
# define MAX_HANDLE_SZ 128
#endif
+#ifdef __USE_GNU
+/* Flags for name_to_handle_at. See comment in fcntl.h about the use
+ of the same AT_* flag bits for different purposes in different
+ functions. */
+# define AT_HANDLE_FID AT_REMOVEDIR /* File handle is needed
+ to compare object
+ identity and may not
+ be usable to
+ open_by_handle_at. */
+#endif
+
__BEGIN_DECLS
#ifdef __USE_GNU
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Add AT_HANDLE_FID from Linux 6.5 to bits/fcntl-linux.h
2023-10-13 23:26 Add AT_HANDLE_FID from Linux 6.5 to bits/fcntl-linux.h Joseph Myers
@ 2023-10-14 8:45 ` Florian Weimer
0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2023-10-14 8:45 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha
* Joseph Myers:
> Linux 6.5 adds a constant AT_HANDLE_FID; add it to glibc. Because
> this is a flag for the function name_to_handle_at declared in
> bits/fcntl-linux.h, put the flag there rather than alongside other
> AT_* flags in (OS-independent) fcntl.h.
>
> Tested for x86_64.
>
> diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> index df378c7b89..dd9d9baf09 100644
> --- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> +++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> @@ -368,6 +368,17 @@ struct file_handle
> # define MAX_HANDLE_SZ 128
> #endif
>
> +#ifdef __USE_GNU
> +/* Flags for name_to_handle_at. See comment in fcntl.h about the use
> + of the same AT_* flag bits for different purposes in different
> + functions. */
> +# define AT_HANDLE_FID AT_REMOVEDIR /* File handle is needed
> + to compare object
> + identity and may not
> + be usable to
> + open_by_handle_at. */
> +#endif
> +
Looks good. Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-14 8:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-13 23:26 Add AT_HANDLE_FID from Linux 6.5 to bits/fcntl-linux.h Joseph Myers
2023-10-14 8:45 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).