mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
linux(4): Add AT_NO_AUTOMOUNT to statx.
Specific to Linux AT_NO_AUTOMOUNT flag tells the kernel to not automount the terminal component of pathname if it is a directory that is an automount point. As it is the default for FreeBSD silencly ignore this flag. glibc-2.34 uses this flag in the stat64 system calls which is used by i386. Reviewed by: trasz Differential revision: https://reviews.freebsd.org/D31524 MFC after: 2 weeks
This commit is contained in:
parent
aae8ae5ea5
commit
ff39d74aa9
2 changed files with 9 additions and 1 deletions
|
|
@ -36,6 +36,13 @@
|
||||||
#define LINUX_AT_EACCESS 0x200
|
#define LINUX_AT_EACCESS 0x200
|
||||||
#define LINUX_AT_REMOVEDIR 0x200
|
#define LINUX_AT_REMOVEDIR 0x200
|
||||||
#define LINUX_AT_SYMLINK_FOLLOW 0x400
|
#define LINUX_AT_SYMLINK_FOLLOW 0x400
|
||||||
|
#define LINUX_AT_NO_AUTOMOUNT 0x800
|
||||||
|
/*
|
||||||
|
* Specific to Linux AT_NO_AUTOMOUNT flag tells the kernel to
|
||||||
|
* not automount the terminal component of pathname if it is a
|
||||||
|
* directory that is an automount point. As FreeBSD does not
|
||||||
|
* have such facility (automount), we can simply ignore this flag.
|
||||||
|
*/
|
||||||
#define LINUX_AT_EMPTY_PATH 0x1000
|
#define LINUX_AT_EMPTY_PATH 0x1000
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -774,7 +774,8 @@ linux_statx(struct thread *td, struct linux_statx_args *args)
|
||||||
int error, dirfd, flags, unsupported;
|
int error, dirfd, flags, unsupported;
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
|
|
||||||
unsupported = args->flags & ~(LINUX_AT_SYMLINK_NOFOLLOW | LINUX_AT_EMPTY_PATH);
|
unsupported = args->flags & ~(LINUX_AT_SYMLINK_NOFOLLOW |
|
||||||
|
LINUX_AT_EMPTY_PATH | LINUX_AT_NO_AUTOMOUNT);
|
||||||
if (unsupported != 0) {
|
if (unsupported != 0) {
|
||||||
linux_msg(td, "statx unsupported flags 0x%x", unsupported);
|
linux_msg(td, "statx unsupported flags 0x%x", unsupported);
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue