X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..bca245acd4c03fd752d1a45f011ad495e60fe53d:/bsd/man/man2/sendfile.2?ds=sidebyside diff --git a/bsd/man/man2/sendfile.2 b/bsd/man/man2/sendfile.2 index 8e31581e2..1e5e537f3 100644 --- a/bsd/man/man2/sendfile.2 +++ b/bsd/man/man2/sendfile.2 @@ -66,7 +66,8 @@ argument specifies how many bytes should be sent with 0 having the special meaning to send until the end of file has been reached. On return the value pointed to by the .Fa len -argument indicates how many bytes have been sent. +argument indicates how many bytes have been sent, except when a header or +trailer is specified as shown below. The .Fa len pointer may not be NULL. @@ -103,6 +104,17 @@ arrays is specified by and .Fa trl_cnt . .Pp +When a header or trailer is specified, the value of +.Fa len +argument indicates the maximum number of bytes in the header and/or file to be sent. +It does not control the trailer; if a trailer exists, all of it will be sent. +If the value of +.Fa len +argument is 0, all of the header and/or file will be sent before the entire trailer is sent. +On return, the +.Fa len +argument specifies the total number of bytes sent. +.Pp The .Fa flags parameter is reserved for future expansion and must be set to 0. Any other value