Sort error descriptions.

This commit is contained in:
wiz 2012-03-04 11:58:31 +00:00
parent 7921bbc68f
commit 87b2e48e9c
1 changed files with 36 additions and 38 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: chmod.2,v 1.39 2012/03/04 00:07:44 dholland Exp $
.\" $NetBSD: chmod.2,v 1.40 2012/03/04 11:58:31 wiz Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -144,8 +144,23 @@ and
.Fn lchmod
will fail and the file mode will be unchanged if:
.Bl -tag -width Er
.It Bq Er ENOTDIR
A component of the path prefix is not a directory.
.It Bq Er EACCES
Search permission is denied for a component of the path prefix.
.It Bq Er EFAULT
.Fa path
points outside the process's allocated address space.
.It Bq Er EFTYPE
The effective user ID is not the super-user, the
.Fa mode
includes the sticky bit
.Pq Dv S_ISVTX ,
and
.Fa path
does not refer to a directory.
.It Bq Er EIO
An I/O error occurred while reading from or writing to the file system.
.It Bq Er ELOOP
Too many symbolic links were encountered in translating the pathname.
.It Bq Er ENAMETOOLONG
A component of a pathname exceeded
.Brq Dv NAME_MAX
@ -154,33 +169,17 @@ characters, or an entire path name exceeded
characters.
.It Bq Er ENOENT
The named file does not exist.
.It Bq Er EACCES
Search permission is denied for a component of the path prefix.
.It Bq Er ELOOP
Too many symbolic links were encountered in translating the pathname.
.It Bq Er ENOTDIR
A component of the path prefix is not a directory.
.It Bq Er EPERM
The effective user ID does not match the owner of the file and
the effective user ID is not the super-user.
.It Bq Er EPERM
The mode includes the setgid bit
the effective user ID is not the super-user; or
the mode includes the setgid bit
.Pq Dv S_ISGID
but the file's group is neither the effective group ID nor is it in the
group access list.
.It Bq Er EROFS
The named file resides on a read-only file system.
.It Bq Er EFAULT
.Fa path
points outside the process's allocated address space.
.It Bq Er EIO
An I/O error occurred while reading from or writing to the file system.
.It Bq Er EFTYPE
The effective user ID is not the super-user, the
.Fa mode
includes the sticky bit
.Pq Dv S_ISVTX ,
and
.Fa path
does not refer to a directory.
.El
.Pp
.Fn fchmod
@ -188,21 +187,6 @@ will fail if:
.Bl -tag -width Er
.It Bq Er EBADF
The descriptor is not valid.
.It Bq Er EINVAL
.Fa fd
refers to a socket, not to a file.
.It Bq Er EPERM
The effective user ID does not match the owner of the file and
the effective user ID is not the super-user.
.It Bq Er EPERM
The mode includes the setgid bit
.Pq Dv S_ISGID
but the file's group is neither the effective group ID nor is it in the
group access list.
.It Bq Er EROFS
The file resides on a read-only file system.
.It Bq Er EIO
An I/O error occurred while reading from or writing to the file system.
.It Bq Er EFTYPE
The effective user ID is not the super-user, the
.Fa mode
@ -211,6 +195,20 @@ includes the sticky bit
and
.Fa fd
does not refer to a directory.
.It Bq Er EINVAL
.Fa fd
refers to a socket, not to a file.
.It Bq Er EIO
An I/O error occurred while reading from or writing to the file system.
.It Bq Er EPERM
The effective user ID does not match the owner of the file and
the effective user ID is not the super-user; or
the mode includes the setgid bit
.Pq Dv S_ISGID
but the file's group is neither the effective group ID nor is it in the
group access list.
.It Bq Er EROFS
The file resides on a read-only file system.
.El
.Sh SEE ALSO
.Xr chmod 1 ,