mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 09:18:31 +00:00
Improve system call documentation
This change also introduces partial faccessat() support for zipos and makes some slight breaking changes in errno results. close() is fixed to use `EBADF` rather than `EINVAL` and we're now using `ENOTSUP` not `EOPNOTSUPP` to indicate that zipos doesn't support a system call yet
This commit is contained in:
parent
0b5f84dd20
commit
ad97775370
18 changed files with 273 additions and 67 deletions
|
@ -22,9 +22,14 @@
|
|||
/**
|
||||
* Checks if effective user can access path in particular ways.
|
||||
*
|
||||
* This is equivalent to saying:
|
||||
*
|
||||
* faccessat(AT_FDCWD, path, mode, 0);
|
||||
*
|
||||
* @param path is a filename or directory
|
||||
* @param mode can be R_OK, W_OK, X_OK, F_OK
|
||||
* @return 0 if ok, or -1 and sets errno
|
||||
* @return 0 if ok, or -1 w/ errno
|
||||
* @see faccessat() for further documentation
|
||||
* @asyncsignalsafe
|
||||
*/
|
||||
int access(const char *path, int mode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue