Cleanup the flags and make them the same as FreeBSD

This commit is contained in:
John Scipione 2012-03-05 20:17:26 -05:00
parent 0ee852ad55
commit 8c7f0a8967
2 changed files with 13 additions and 15 deletions

View File

@ -279,14 +279,6 @@ fchownat(int fd, const char* path, uid_t owner, gid_t group, int flag)
int
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) {
// do not dereference, instead return information about the link
// itself

View File

@ -5,15 +5,21 @@
#ifndef 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() */
#define AT_SYMLINK_FOLLOW 0x02 /* linkat() */
#define AT_REMOVEDIR 0x04 /* unlinkat() */
#define AT_EACCESS 0x08 /* faccessat() */
#define AT_NO_AUTOMOUNT 0x10 /* fstatat */
#define AT_SYMLINK_FOLLOW 0x400 /* linkat() */
#define AT_REMOVEDIR 0x800 /* unlinkat() */
int eaccess(const char* path, int accessMode);
int faccessat(int fd, const char* path, int accessMode, int flag);