aboutsummaryrefslogtreecommitdiffstats
path: root/man2
diff options
context:
space:
mode:
Diffstat (limited to 'man2')
-rw-r--r--man2/chmod.283
-rw-r--r--man2/chown.275
-rw-r--r--man2/mkdir.233
-rw-r--r--man2/mknod.233
-rw-r--r--man2/open.233
-rw-r--r--man2/readlink.221
-rw-r--r--man2/stat.242
-rw-r--r--man2/symlink.246
8 files changed, 166 insertions, 200 deletions
diff --git a/man2/chmod.2 b/man2/chmod.2
index 6862a7e3d2..b1aa3691ce 100644
--- a/man2/chmod.2
+++ b/man2/chmod.2
@@ -245,10 +245,30 @@ Search permission is denied on a component of the path prefix.
(See also
.BR path_resolution (7).)
.TP
+.B EBADF
+.RB ( fchmod ())
+The file descriptor
+.I fd
+is not valid.
+.TP
+.B EBADF
+.RB ( fchmodat ())
+.I pathname
+is relative but
+.I dirfd
+is neither
+.B AT_FDCWD
+nor a valid file descriptor.
+.TP
.B EFAULT
.I pathname
points outside your accessible address space.
.TP
+.B EINVAL
+.RB ( fchmodat ())
+Invalid flag specified in
+.IR flags .
+.TP
.B EIO
An I/O error occurred.
.TP
@@ -269,6 +289,20 @@ Insufficient kernel memory was available.
.B ENOTDIR
A component of the path prefix is not a directory.
.TP
+.B ENOTDIR
+.RB ( fchmodat ())
+.I pathname
+is relative and
+.I dirfd
+is a file descriptor referring to a file other than a directory.
+.TP
+.B ENOTSUP
+.RB ( fchmodat ())
+.I flags
+specified
+.BR AT_SYMLINK_NOFOLLOW ,
+which is not supported.
+.TP
.B EPERM
The effective UID does not match the owner of the file,
and the process is not privileged (Linux: it does not have the
@@ -282,55 +316,6 @@ The file is marked immutable or append-only.
.TP
.B EROFS
The named file resides on a read-only filesystem.
-.PP
-The general errors for
-.BR fchmod ()
-are listed below:
-.TP
-.B EBADF
-The file descriptor
-.I fd
-is not valid.
-.TP
-.B EIO
-See above.
-.TP
-.B EPERM
-See above.
-.TP
-.B EROFS
-See above.
-.PP
-The same errors that occur for
-.BR chmod ()
-can also occur for
-.BR fchmodat ().
-The following additional errors can occur for
-.BR fchmodat ():
-.TP
-.B EBADF
-.I pathname
-is relative but
-.I dirfd
-is neither
-.B AT_FDCWD
-nor a valid file descriptor.
-.TP
-.B EINVAL
-Invalid flag specified in
-.IR flags .
-.TP
-.B ENOTDIR
-.I pathname
-is relative and
-.I dirfd
-is a file descriptor referring to a file other than a directory.
-.TP
-.B ENOTSUP
-.I flags
-specified
-.BR AT_SYMLINK_NOFOLLOW ,
-which is not supported.
.SH VERSIONS
.BR fchmodat ()
was added to Linux in kernel 2.6.16;
diff --git a/man2/chown.2 b/man2/chown.2
index 354193c283..a3a76fda70 100644
--- a/man2/chown.2
+++ b/man2/chown.2
@@ -232,10 +232,33 @@ Search permission is denied on a component of the path prefix.
(See also
.BR path_resolution (7).)
.TP
+.B EBADF
+.RB ( fchown ())
+.I fd
+is not a valid open file descriptor.
+.TP
+.B EBADF
+.RB ( fchownat ())
+.I pathname
+is relative but
+.I dirfd
+is neither
+.B AT_FDCWD
+nor a valid file descriptor.
+.TP
.B EFAULT
.I pathname
points outside your accessible address space.
.TP
+.B EINVAL
+.RB ( fchownat ())
+Invalid flag specified in
+.IR flags .
+.TP
+.B EIO
+.RB ( fchown ())
+A low-level I/O error occurred while modifying the inode.
+.TP
.B ELOOP
Too many symbolic links were encountered in resolving
.IR pathname .
@@ -253,6 +276,13 @@ Insufficient kernel memory was available.
.B ENOTDIR
A component of the path prefix is not a directory.
.TP
+.B ENOTDIR
+.RB ( fchownat ())
+.I pathname
+is relative and
+.I dirfd
+is a file descriptor referring to a file other than a directory.
+.TP
.B EPERM
The calling process did not have the required permissions
(see above) to change owner and/or group.
@@ -264,51 +294,6 @@ The file is marked immutable or append-only.
.TP
.B EROFS
The named file resides on a read-only filesystem.
-.PP
-The general errors for
-.BR fchown ()
-are listed below:
-.TP
-.B EBADF
-.I fd
-is not a valid open file descriptor.
-.TP
-.B EIO
-A low-level I/O error occurred while modifying the inode.
-.TP
-.B ENOENT
-See above.
-.TP
-.B EPERM
-See above.
-.TP
-.B EROFS
-See above.
-.PP
-The same errors that occur for
-.BR chown ()
-can also occur for
-.BR fchownat ().
-The following additional errors can occur for
-.BR fchownat ():
-.TP
-.B EBADF
-.I pathname
-is relative but
-.I dirfd
-is neither
-.B AT_FDCWD
-nor a valid file descriptor.
-.TP
-.B EINVAL
-Invalid flag specified in
-.IR flags .
-.TP
-.B ENOTDIR
-.I pathname
-is relative and
-.I dirfd
-is a file descriptor referring to a file other than a directory.
.SH VERSIONS
.BR fchownat ()
was added to Linux in kernel 2.6.16;
diff --git a/man2/mkdir.2 b/man2/mkdir.2
index 355ba086e7..9c541058f5 100644
--- a/man2/mkdir.2
+++ b/man2/mkdir.2
@@ -126,6 +126,15 @@ did not allow search permission.
(See also
.BR path_resolution (7).)
.TP
+.B EBADF
+.RB ( mkdirat ())
+.I pathname
+is relative but
+.I dirfd
+is neither
+.B AT_FDCWD
+nor a valid file descriptor.
+.TP
.B EDQUOT
The user's quota of disk blocks or inodes on the filesystem has been
exhausted.
@@ -179,6 +188,13 @@ A component used as a directory in
.I pathname
is not, in fact, a directory.
.TP
+.B ENOTDIR
+.RB ( mkdirat ())
+.I pathname
+is relative and
+.I dirfd
+is a file descriptor referring to a file other than a directory.
+.TP
.B EPERM
The filesystem containing
.I pathname
@@ -187,23 +203,6 @@ does not support the creation of directories.
.B EROFS
.I pathname
refers to a file on a read-only filesystem.
-.PP
-The following additional errors can occur for
-.BR mkdirat ():
-.TP
-.B EBADF
-.I pathname
-is relative but
-.I dirfd
-is neither
-.B AT_FDCWD
-nor a valid file descriptor.
-.TP
-.B ENOTDIR
-.I pathname
-is relative and
-.I dirfd
-is a file descriptor referring to a file other than a directory.
.SH VERSIONS
.BR mkdirat ()
was added to Linux in kernel 2.6.16;
diff --git a/man2/mknod.2 b/man2/mknod.2
index f5bb0900af..143f67d0a3 100644
--- a/man2/mknod.2
+++ b/man2/mknod.2
@@ -163,6 +163,15 @@ did not allow search permission.
(See also
.BR path_resolution (7).)
.TP
+.B EBADF
+.BR ( mknodat ())
+.I pathname
+is relative but
+.I dirfd
+is neither
+.B AT_FDCWD
+nor a valid file descriptor.
+.TP
.B EDQUOT
The user's quota of disk blocks or inodes on the filesystem has been
exhausted.
@@ -207,6 +216,13 @@ A component used as a directory in
.I pathname
is not, in fact, a directory.
.TP
+.B ENOTDIR
+.BR ( mknodat ())
+.I pathname
+is relative and
+.I dirfd
+is a file descriptor referring to a file other than a directory.
+.TP
.B EPERM
.I mode
requested creation of something other than a regular file,
@@ -224,23 +240,6 @@ does not support the type of node requested.
.B EROFS
.I pathname
refers to a file on a read-only filesystem.
-.PP
-The following additional errors can occur for
-.BR mknodat ():
-.TP
-.B EBADF
-.I pathname
-is relative but
-.I dirfd
-is neither
-.B AT_FDCWD
-nor a valid file descriptor.
-.TP
-.B ENOTDIR
-.I pathname
-is relative and
-.I dirfd
-is a file descriptor referring to a file other than a directory.
.SH VERSIONS
.BR mknodat ()
was added to Linux in kernel 2.6.16;
diff --git a/man2/open.2 b/man2/open.2
index af8120cfab..5eca172ecc 100644
--- a/man2/open.2
+++ b/man2/open.2
@@ -1034,6 +1034,15 @@ and
in
.BR proc (5).
.TP
+.B EBADF
+.RB ( openat ())
+.I pathname
+is relative but
+.I dirfd
+is neither
+.B AT_FDCWD
+nor a valid file descriptor.
+.TP
.B EBUSY
.B O_EXCL
was specified in
@@ -1210,6 +1219,13 @@ is not, in fact, a directory, or \fBO_DIRECTORY\fP was specified and
.I pathname
was not a directory.
.TP
+.B ENOTDIR
+.RB ( openat ())
+.I pathname
+is a relative pathname and
+.I dirfd
+is a file descriptor referring to a file other than a directory.
+.TP
.B ENXIO
.BR O_NONBLOCK " | " O_WRONLY
is set, the named file is a FIFO, and
@@ -1285,23 +1301,6 @@ The
flag was specified, and an incompatible lease was held on the file
(see
.BR fcntl (2)).
-.PP
-The following additional errors can occur for
-.BR openat ():
-.TP
-.B EBADF
-.I pathname
-is relative but
-.I dirfd
-is neither
-.B AT_FDCWD
-nor a valid file descriptor.
-.TP
-.B ENOTDIR
-.I pathname
-is a relative pathname and
-.I dirfd
-is a file descriptor referring to a file other than a directory.
.SH VERSIONS
.BR openat ()
was added to Linux in kernel 2.6.16;
diff --git a/man2/readlink.2 b/man2/readlink.2
index 6ae07c3852..a1ffbf7d01 100644
--- a/man2/readlink.2
+++ b/man2/readlink.2
@@ -160,6 +160,15 @@ Search permission is denied for a component of the path prefix.
(See also
.BR path_resolution (7).)
.TP
+.B EBADF
+.RB ( readlinkat ())
+.I pathname
+is relative but
+.I dirfd
+is neither
+.B AT_FDCWD
+nor a valid file descriptor.
+.TP
.B EFAULT
.I buf
extends outside the process's allocated address space.
@@ -195,19 +204,9 @@ Insufficient kernel memory was available.
.TP
.B ENOTDIR
A component of the path prefix is not a directory.
-.PP
-The following additional errors can occur for
-.BR readlinkat ():
-.TP
-.B EBADF
-.I pathname
-is relative but
-.I dirfd
-is neither
-.B AT_FDCWD
-nor a valid file descriptor.
.TP
.B ENOTDIR
+.RB ( readlinkat ())
.I pathname
is relative and
.I dirfd
diff --git a/man2/stat.2 b/man2/stat.2
index e5859abaff..08a99690a7 100644
--- a/man2/stat.2
+++ b/man2/stat.2
@@ -381,9 +381,23 @@ in the path prefix of
.I fd
is not a valid open file descriptor.
.TP
+.B EBADF
+.RB ( fstatat ())
+.I pathname
+is relative but
+.I dirfd
+is neither
+.B AT_FDCWD
+nor a valid file descriptor.
+.TP
.B EFAULT
Bad address.
.TP
+.B EINVAL
+.RB ( fstatat ())
+Invalid flag specified in
+.IR flags .
+.TP
.B ELOOP
Too many symbolic links encountered while traversing the path.
.TP
@@ -411,6 +425,13 @@ A component of the path prefix of
.I pathname
is not a directory.
.TP
+.B ENOTDIR
+.RB ( fstatat ())
+.I pathname
+is relative and
+.I dirfd
+is a file descriptor referring to a file other than a directory.
+.TP
.B EOVERFLOW
.I pathname
or
@@ -429,27 +450,6 @@ calls
on a file whose size exceeds
.I (1<<31)\-1
bytes.
-.PP
-The following additional errors can occur for
-.BR fstatat ():
-.TP
-.B EBADF
-.I pathname
-is relative but
-.I dirfd
-is neither
-.B AT_FDCWD
-nor a valid file descriptor.
-.TP
-.B EINVAL
-Invalid flag specified in
-.IR flags .
-.TP
-.B ENOTDIR
-.I pathname
-is relative and
-.I dirfd
-is a file descriptor referring to a file other than a directory.
.SH VERSIONS
.BR fstatat ()
was added to Linux in kernel 2.6.16;
diff --git a/man2/symlink.2 b/man2/symlink.2
index f0c4293a7f..f5bf7ef231 100644
--- a/man2/symlink.2
+++ b/man2/symlink.2
@@ -152,6 +152,15 @@ did not allow search permission.
(See also
.BR path_resolution (7).)
.TP
+.B EBADF
+.RB ( symlinkat ())
+.I linkpath
+is relative but
+.I newdirfd
+is neither
+.B AT_FDCWD
+nor a valid file descriptor.
+.TP
.B EDQUOT
The user's quota of resources on the filesystem has been exhausted.
The resources could be inodes or disk blocks, depending on the filesystem
@@ -183,6 +192,13 @@ or
.I linkpath
is an empty string.
.TP
+.B ENOENT
+.RB ( symlinkat ())
+.I linkpath
+is a relative pathname and
+.IR newdirfd
+refers to a directory that has been deleted.
+.TP
.B ENOMEM
Insufficient kernel memory was available.
.TP
@@ -195,6 +211,13 @@ A component used as a directory in
.I linkpath
is not, in fact, a directory.
.TP
+.B ENOTDIR
+.RB ( symlinkat ())
+.I linkpath
+is relative and
+.I newdirfd
+is a file descriptor referring to a file other than a directory.
+.TP
.B EPERM
The filesystem containing
.I linkpath
@@ -203,29 +226,6 @@ does not support the creation of symbolic links.
.B EROFS
.I linkpath
is on a read-only filesystem.
-.PP
-The following additional errors can occur for
-.BR symlinkat ():
-.TP
-.B EBADF
-.I linkpath
-is relative but
-.I newdirfd
-is neither
-.B AT_FDCWD
-nor a valid file descriptor.
-.TP
-.B ENOENT
-.I linkpath
-is a relative pathname and
-.IR newdirfd
-refers to a directory that has been deleted.
-.TP
-.B ENOTDIR
-.I linkpath
-is relative and
-.I newdirfd
-is a file descriptor referring to a file other than a directory.
.SH VERSIONS
.BR symlinkat ()
was added to Linux in kernel 2.6.16;