Add unlinkat(2) specific errors.
This commit is contained in:
parent
26fb54447e
commit
85cc963274
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: unlink.2,v 1.27 2013/01/13 08:15:02 dholland Exp $
|
||||
.\" $NetBSD: unlink.2,v 1.28 2013/07/28 13:53:04 njoly Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -29,7 +29,7 @@
|
|||
.\"
|
||||
.\" @(#)unlink.2 8.1 (Berkeley) 6/4/93
|
||||
.\"
|
||||
.Dd November 18, 2012
|
||||
.Dd July 28, 2013
|
||||
.Dt UNLINK 2
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -95,13 +95,12 @@ provided
|
|||
is set in
|
||||
.Fa flag .
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion, a value of 0 is returned.
|
||||
Otherwise, a value of \-1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Rv -std unlink unlinkat
|
||||
.Sh ERRORS
|
||||
The
|
||||
.Fn unlink
|
||||
and
|
||||
.Fn unlinkat
|
||||
succeeds unless:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EACCES
|
||||
|
@ -141,6 +140,37 @@ are owned by the effective user ID.
|
|||
.It Bq Er EROFS
|
||||
The named file resides on a read-only file system.
|
||||
.El
|
||||
.Pp
|
||||
In addition,
|
||||
.Fn unlinkat
|
||||
will fail if:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EBADF
|
||||
.Fa path
|
||||
does not specify an absolute path and
|
||||
.Fa fd
|
||||
is neither
|
||||
.Dv AT_FDCWD
|
||||
nor a valid file descriptor open for reading or searching.
|
||||
.It Bq Er ENOTDIR
|
||||
.Fa path
|
||||
is not an absolute path and
|
||||
.Fa fd
|
||||
is a file descriptor associated with a non-directory file; or
|
||||
.Fa flag
|
||||
has
|
||||
.Dv AT_REMOVEDIR
|
||||
set and
|
||||
.Fa path
|
||||
does not name a directory.
|
||||
.It Bq Er ENOTEMPTY
|
||||
.Fa flag
|
||||
has
|
||||
.Dv AT_REMOVEDIR
|
||||
set and
|
||||
.Fa path
|
||||
is a directory that is not empty.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr close 2 ,
|
||||
.Xr link 2 ,
|
||||
|
|
Loading…
Reference in New Issue