From: Petr Baudis Date: Thu, 12 Apr 2012 19:00:49 +0000 (+0200) Subject: Fix description of user provided write function X-Git-Tag: glibc-2.16-tps~613 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=247c3ede396bf000b6e095e5d2b361aa329fc180;p=thirdparty%2Fglibc.git Fix description of user provided write function [BZ #2074] * stdio.texi (Hook Functions): The user provided writer function is not allowed to return -1. --- diff --git a/ChangeLog b/ChangeLog index 41e6190d4ce..3ccd2f78c5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-04-12 Petr Baudis + + [BZ #2074] + * stdio.texi (Hook Functions): The user provided writer function + is not allowed to return -1. + 2012-04-11 David S. Miller * sysdeps/sparc/fpu/libm-test-ulps: Update. diff --git a/manual/stdio.texi b/manual/stdio.texi index e870afb1637..c58ca22b2d3 100644 --- a/manual/stdio.texi +++ b/manual/stdio.texi @@ -5021,7 +5021,8 @@ ssize_t @var{writer} (void *@var{cookie}, const char *@var{buffer}, size_t @var{ This is very similar to the @code{write} function; see @ref{I/O Primitives}. Your function should transfer up to @var{size} bytes from the buffer, and return the number of bytes written. You can return a -value of @code{-1} to indicate an error. +value of @code{0} to indicate an error. You must not return any +negative value. You should define the function to perform seek operations on the cookie as: