diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-21 17:26:58 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-21 17:26:58 +0100 |
commit | 331b21b7c6cbee14b4d12f4126ac9c6f35163584 (patch) | |
tree | dbe36f2d443a4ccbdafb0271bdb5ddb2181fafe2 /include | |
parent | typo + redirected .h files (diff) | |
download | slibc-331b21b7c6cbee14b4d12f4126ac9c6f35163584.tar.gz slibc-331b21b7c6cbee14b4d12f4126ac9c6f35163584.tar.bz2 slibc-331b21b7c6cbee14b4d12f4126ac9c6f35163584.tar.xz |
doc F_OK, X_OK, W_OK, and R_OK, the placeholder values were the correct values
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/unistd.h | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/include/unistd.h b/include/unistd.h index c45e425..9a5f612 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -73,13 +73,72 @@ #define STDERR_FILENO 2 -/* TODO temporary values */ +/** + * Used in `access` and `faccessat`, to check + * weather a file appears to exists for the + * current user. It is impled for `X_OK`, + * `W_OK` and `R_OK`. + * + * Its value, 0, comes from that this check + * is always performed. + * + * @etymology This constant is named in symmetry with + * `X_OK`, `W_OK`, and `R_OK`. The 'F' comes + * from "(f)ile exists", and '_OK' comes + * from the name of the other '?(_OK)' + * constants. + * + * @since Always. + */ #define F_OK 0 + +/** + * Used in `access` and `faccessat`, to check + * weather a file is executable (for directories: + * its content can be listed) for the current + * user. Implies `F_OK`. + * + * Its value, 1, comes from that for each user-octet + * in the permission bits, the bit 1 signifies that + * the file is executable. + * + * @etymology Is e(x)ecute (ok)ay? + * + * @since Always. + */ #define X_OK 1 + +/** + * Used in `access` and `faccessat`, to check + * weather a file is writable for the current + * user. Implies `F_OK`. + * + * Its value, 2, comes from that for each user-octet + * in the permission bits, the bit 2 signifies that + * the file is writable. + * + * @since Always. + * @etymology Is (w)rite (ok)ay? + */ #define W_OK 2 + +/** + * Used in `access` and `faccessat`, to check + * weather a file is readable for the current + * user. Implies `F_OK`. + * + * Its value, 4, comes from that for each user-octet + * in the permission bits, the bit 4 signifies that + * the file is readable. + * + * @etymology Is (r)ead (ok)ay? + * + * @since Always. + */ #define R_OK 4 + /** * Set the high end of the calling process's * data segment. |