summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux
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/linux
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/linux')
-rw-r--r--sys/compat/linux/linux_file.c12
1 files changed, 6 insertions, 6 deletions
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);
OpenPOWER on IntegriCloud