More detailed errors [forgot to commit this a while ago]

This commit is contained in:
christos 2006-07-27 15:48:30 +00:00
parent a14221d559
commit db1b909e30

View File

@ -1,4 +1,4 @@
.\" $NetBSD: truncate.2,v 1.21 2004/05/13 10:20:58 wiz Exp $
.\" $NetBSD: truncate.2,v 1.22 2006/07/27 15:48:30 christos Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -29,7 +29,7 @@
.\"
.\" @(#)truncate.2 8.1 (Berkeley) 6/4/93
.\"
.Dd August 18, 2002
.Dd June 26, 2006
.Dt TRUNCATE 2
.Os
.Sh NAME
@ -70,8 +70,27 @@ If the call fails a \-1 is returned, and the global variable
.Va errno
specifies the error.
.Sh ERRORS
Error return codes common to
.Fn truncate
succeeds unless:
and
.Fn ftruncate
are:
.Bl -tag -width Er
.It Bq Er EISDIR
The named file is a directory.
.It Bq Er EROFS
The named file resides on a read-only file system.
.It Bq Er ETXTBSY
The file is a pure procedure (shared text) file that is being executed.
.It Bq Er EIO
An I/O error occurred updating the inode.
.It Bq Er ENOSPC
There was no space in the filesystem to complete the operation.
.El
.Pp
Error codes specific to
.Fn truncate
are:
.Bl -tag -width Er
.It Bq Er ENOTDIR
A component of the path prefix is not a directory.
@ -88,21 +107,14 @@ Search permission is denied for a component of the path prefix, or
the named file is not writable by the user.
.It Bq Er ELOOP
Too many symbolic links were encountered in translating the pathname.
.It Bq Er EISDIR
The named file is a directory.
.It Bq Er EROFS
The named file resides on a read-only file system.
.It Bq Er ETXTBSY
The file is a pure procedure (shared text) file that is being executed.
.It Bq Er EIO
An I/O error occurred updating the inode.
.It Bq Er EFAULT
.Fa path
points outside the process's allocated address space.
.El
.Pp
Error codes specific to
.Fn ftruncate
succeeds unless:
are:
.Bl -tag -width Er
.It Bq Er EBADF
The