summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-11-19 06:35:15 +0000
committered <ed@FreeBSD.org>2011-11-19 06:35:15 +0000
commit9cedd4d52c52b7d4511fb969386e788a62e49b84 (patch)
tree5afd09d03606293b75fe136df777b33a9dfe8703 /sys/compat
parentf0a67116809a4da6e49f05917afce94700cdf014 (diff)
downloadFreeBSD-src-9cedd4d52c52b7d4511fb969386e788a62e49b84.zip
FreeBSD-src-9cedd4d52c52b7d4511fb969386e788a62e49b84.tar.gz
Improve *access*() parameter name consistency.
The current code mixes the use of `flags' and `mode'. This is a bit confusing, since the faccessat() function as a `flag' parameter to store the AT_ flag. Make this less confusing by using the same name as used in the POSIX specification -- `amode'.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/freebsd32/syscalls.master6
-rw-r--r--sys/compat/linux/linux_file.c12
-rw-r--r--sys/compat/svr4/svr4_fcntl.c2
-rw-r--r--sys/compat/svr4/syscalls.master2
4 files changed, 11 insertions, 11 deletions
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
index cb22f8b..78598c3 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -113,7 +113,7 @@
int *alen); }
32 AUE_GETSOCKNAME NOPROTO { int getsockname(int fdes, caddr_t asa, \
int *alen); }
-33 AUE_ACCESS NOPROTO { int access(char *path, int flags); }
+33 AUE_ACCESS NOPROTO { int access(char *path, int amode); }
34 AUE_CHFLAGS NOPROTO { int chflags(char *path, int flags); }
35 AUE_FCHFLAGS NOPROTO { int fchflags(int fd, int flags); }
36 AUE_SYNC NOPROTO { int sync(void); }
@@ -671,7 +671,7 @@
const char *attrname); }
374 AUE_NULL NOPROTO { int __setugid(int flag); }
375 AUE_NULL UNIMPL nfsclnt
-376 AUE_EACCESS NOPROTO { int eaccess(char *path, int flags); }
+376 AUE_EACCESS NOPROTO { int eaccess(char *path, int amode); }
377 AUE_NULL UNIMPL afs_syscall
378 AUE_NMOUNT STD { int freebsd32_nmount(struct iovec32 *iovp, \
unsigned int iovcnt, int flags); }
@@ -911,7 +911,7 @@
u_int32_t id1, u_int32_t id2, \
size_t cpusetsize, \
const cpuset_t *mask); }
-489 AUE_FACCESSAT NOPROTO { int faccessat(int fd, char *path, int mode, \
+489 AUE_FACCESSAT NOPROTO { int faccessat(int fd, char *path, int amode, \
int flag); }
490 AUE_FCHMODAT NOPROTO { int fchmodat(int fd, const char *path, \
mode_t mode, int flag); }
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 9cbc3a2..97e4e04 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -565,16 +565,16 @@ linux_access(struct thread *td, struct linux_access_args *args)
int error;
/* linux convention */
- if (args->flags & ~(F_OK | X_OK | W_OK | R_OK))
+ if (args->amode & ~(F_OK | X_OK | W_OK | R_OK))
return (EINVAL);
LCONVPATHEXIST(td, args->path, &path);
#ifdef DEBUG
if (ldebug(access))
- printf(ARGS(access, "%s, %d"), path, args->flags);
+ printf(ARGS(access, "%s, %d"), path, args->amode);
#endif
- error = kern_access(td, path, UIO_SYSSPACE, args->flags);
+ error = kern_access(td, path, UIO_SYSSPACE, args->amode);
LFREEPATH(path);
return (error);
@@ -587,7 +587,7 @@ linux_faccessat(struct thread *td, struct linux_faccessat_args *args)
int error, dfd;
/* linux convention */
- if (args->mode & ~(F_OK | X_OK | W_OK | R_OK))
+ if (args->amode & ~(F_OK | X_OK | W_OK | R_OK))
return (EINVAL);
dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd;
@@ -595,11 +595,11 @@ linux_faccessat(struct thread *td, struct linux_faccessat_args *args)
#ifdef DEBUG
if (ldebug(access))
- printf(ARGS(access, "%s, %d"), path, args->mode);
+ printf(ARGS(access, "%s, %d"), path, args->amode);
#endif
error = kern_accessat(td, dfd, path, UIO_SYSSPACE, 0 /* XXX */,
- args->mode);
+ args->amode);
LFREEPATH(path);
return (error);
diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c
index cbca7e2..b9d3ace 100644
--- a/sys/compat/svr4/svr4_fcntl.c
+++ b/sys/compat/svr4/svr4_fcntl.c
@@ -488,7 +488,7 @@ svr4_sys_access(td, uap)
int error;
CHECKALTEXIST(td, uap->path, &newpath);
- error = kern_access(td, newpath, UIO_SYSSPACE, uap->flags);
+ error = kern_access(td, newpath, UIO_SYSSPACE, uap->amode);
free(newpath, M_TEMP);
return (error);
}
diff --git a/sys/compat/svr4/syscalls.master b/sys/compat/svr4/syscalls.master
index 2d6afee..0997ab7 100644
--- a/sys/compat/svr4/syscalls.master
+++ b/sys/compat/svr4/syscalls.master
@@ -77,7 +77,7 @@
31 AUE_NULL UNIMPL stty
32 AUE_NULL UNIMPL gtty
33 AUE_NULL STD { int svr4_sys_access(char *path, \
- int flags); }
+ int amode); }
34 AUE_NULL STD { int svr4_sys_nice(int prio); }
35 AUE_NULL UNIMPL statfs
36 AUE_NULL NOPROTO { int sync(void); }
OpenPOWER on IntegriCloud