This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 16ae0b9e7d37509513c5cd0faa66b472afaebdde Author: Chris Lemmons <[email protected]> AuthorDate: Thu May 10 09:42:50 2018 +0000 Update documentation for TSfread/TSfwrite to match new types. (cherry picked from commit 784e1f49ee69ee68681834a0a0483399a70e5389) --- doc/developer-guide/api/functions/TSfread.en.rst | 9 +++++++-- doc/developer-guide/api/functions/TSfwrite.en.rst | 8 +++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/developer-guide/api/functions/TSfread.en.rst b/doc/developer-guide/api/functions/TSfread.en.rst index 2ade12b..52b1421 100644 --- a/doc/developer-guide/api/functions/TSfread.en.rst +++ b/doc/developer-guide/api/functions/TSfread.en.rst @@ -26,11 +26,16 @@ Synopsis `#include <ts/ts.h>` -.. function:: size_t TSfread(TSFile filep, void * buf, size_t length) +.. function:: ssize_t TSfread(TSFile filep, void * buf, size_t length) Description =========== Attempts to read :arg:`length` bytes of data from the file pointed to by -:arg:`filep` into the buffer :arg:`buf`. +:arg:`filep` into the buffer :arg:`buf`. The behavior is undefined if +:arg:`length` is greater than SSIZE_MAX. +Return Value +============ + +Returns the number of bytes read on success, or -1 on failure. diff --git a/doc/developer-guide/api/functions/TSfwrite.en.rst b/doc/developer-guide/api/functions/TSfwrite.en.rst index 71d9935..30b33ae 100644 --- a/doc/developer-guide/api/functions/TSfwrite.en.rst +++ b/doc/developer-guide/api/functions/TSfwrite.en.rst @@ -26,7 +26,7 @@ Synopsis `#include <ts/ts.h>` -.. function:: size_t TSfwrite(TSFile filep, const void * buf, size_t length) +.. function:: ssize_t TSfwrite(TSFile filep, const void * buf, size_t length) Description =========== @@ -39,3 +39,9 @@ number of bytes written (:c:func:`TSfwrite` returns this value) against the value of :arg:`length`. If it is less, there might be insufficient space on disk, for example. +The behavior is undefined if length is greater than SSIZE_MAX. + +Return Value +============ + +Returns the number of bytes actually written, or -1 if an error occured. -- To stop receiving notification emails like this one, please contact [email protected].
