-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
.\" This manpage is Copyright (C) 1992 Drew Eckhardt;
-.\" 1993 Michael Haardt, Ian Jackson.
+.\" and Copyright (C) 1993 Michael Haardt, Ian Jackson.
.\" and Copyright (C) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.\" Modified Sat Jul 24 13:35:59 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Sun Nov 28 17:19:01 1993 by Rik Faith <faith@cs.unc.edu>
.\" gave some examples of why this might occur.
.\" Noted what happens if write() is interrupted by a signal.
.\"
-.TH WRITE 2 2009-02-23 "Linux" "Linux Programmer's Manual"
+.TH WRITE 2 2013-01-27 "Linux" "Linux Programmer's Manual"
.SH NAME
write \- write to a file descriptor
.SH SYNOPSIS
which can be proved to occur after a
.BR write ()
has returned returns the new data.
-Note that not all file systems are POSIX conforming.
-.SH "RETURN VALUE"
+Note that not all filesystems are POSIX conforming.
+.SH RETURN VALUE
On success, the number of bytes written is returned (zero indicates
nothing was written).
On error, \-1 is returned, and \fIerrno\fP is set
.I fd
is not a valid file descriptor or is not open for writing.
.TP
+.B EDESTADDRREQ
+.I fd
+refers to a datagram socket for which a peer address has not been set using
+.BR connect (2).
+.TP
+.B EDQUOT
+The user's quota of disk blocks on the filesystem containing the file
+referred to by
+.I fd
+has been exhausted.
+.TP
.B EFAULT
.I buf
is outside your accessible address space.
.PP
Other errors may occur, depending on the object connected to
.IR fd .
-.SH "CONFORMING TO"
+.SH CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001.
.\" SVr4 documents additional error
.\" conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
.BR EINTR ;
if it is interrupted after at least one byte has been written,
the call succeeds, and returns the number of bytes written.
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR close (2),
.BR fcntl (2),
.BR fsync (2),