Cleanup the flags and make them the same as FreeBSD
This commit is contained in:
@@ -279,14 +279,6 @@ fchownat(int fd, const char* path, uid_t owner, gid_t group, int flag)
|
|||||||
int
|
int
|
||||||
fstatat(int fd, const char *path, struct stat *st, int flag)
|
fstatat(int fd, const char *path, struct stat *st, int flag)
|
||||||
{
|
{
|
||||||
if ((flag & AT_NO_AUTOMOUNT) == 0) {
|
|
||||||
// Don't automount the terminal ("basename") component of pathname if
|
|
||||||
// it is a directory that is an automount point.
|
|
||||||
// CURRENTLY UNSUPPORTED
|
|
||||||
errno = ENOTSUP;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((flag & AT_SYMLINK_NOFOLLOW) == 0) {
|
if ((flag & AT_SYMLINK_NOFOLLOW) == 0) {
|
||||||
// do not dereference, instead return information about the link
|
// do not dereference, instead return information about the link
|
||||||
// itself
|
// itself
|
||||||
|
|||||||
@@ -5,15 +5,21 @@
|
|||||||
#ifndef FS_DARWIN_H
|
#ifndef FS_DARWIN_H
|
||||||
#define FS_DARWIN_H
|
#define FS_DARWIN_H
|
||||||
|
|
||||||
/* flags for the *at() functions */
|
/*
|
||||||
#define AT_FDCWD (-1) /* CWD FD for the *at() functions */
|
* Magic value that specify the use of the current working directory
|
||||||
|
* to determine the target of relative file paths in the openat() and
|
||||||
|
* similar syscalls.
|
||||||
|
*/
|
||||||
|
#define AT_FDCWD -100 /* CWD FD for the *at() functions */
|
||||||
|
|
||||||
#define AT_SYMLINK_NOFOLLOW 0x01 /* fstatat(), fchmodat(), fchownat(),
|
/*
|
||||||
|
* Miscellaneous flags for the *at() syscalls.
|
||||||
|
*/
|
||||||
|
#define AT_EACCESS 0x100 /* faccessat() */
|
||||||
|
#define AT_SYMLINK_NOFOLLOW 0x200 /* fstatat(), fchmodat(), fchownat(),
|
||||||
utimensat() */
|
utimensat() */
|
||||||
#define AT_SYMLINK_FOLLOW 0x02 /* linkat() */
|
#define AT_SYMLINK_FOLLOW 0x400 /* linkat() */
|
||||||
#define AT_REMOVEDIR 0x04 /* unlinkat() */
|
#define AT_REMOVEDIR 0x800 /* unlinkat() */
|
||||||
#define AT_EACCESS 0x08 /* faccessat() */
|
|
||||||
#define AT_NO_AUTOMOUNT 0x10 /* fstatat */
|
|
||||||
|
|
||||||
int eaccess(const char* path, int accessMode);
|
int eaccess(const char* path, int accessMode);
|
||||||
int faccessat(int fd, const char* path, int accessMode, int flag);
|
int faccessat(int fd, const char* path, int accessMode, int flag);
|
||||||
|
|||||||
Reference in New Issue
Block a user