From: Andy Pan Date: Fri, 26 Aug 2022 18:51:11 +0000 (+0800) Subject: net: add the missing OS Darwin in the comment of sendFile X-Git-Tag: go1.20rc1~1361 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=59bdbb3effe3e61f85e336a52323024bafaf44bd;p=gostls13.git net: add the missing OS Darwin in the comment of sendFile Change-Id: Ice7e3762d4a1d71e23d619be699697f5c6523cc5 Reviewed-on: https://go-review.googlesource.com/c/go/+/425879 Reviewed-by: Ian Lance Taylor Reviewed-by: Heschi Kreinick Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot --- diff --git a/src/net/sendfile_unix_alt.go b/src/net/sendfile_unix_alt.go index f99af92bc8..b86771721e 100644 --- a/src/net/sendfile_unix_alt.go +++ b/src/net/sendfile_unix_alt.go @@ -20,7 +20,7 @@ import ( // // if handled == false, sendFile performed no work. func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) { - // FreeBSD, DragonFly and Solaris use 0 as the "until EOF" value. + // Darwin, FreeBSD, DragonFly and Solaris use 0 as the "until EOF" value. // If you pass in more bytes than the file contains, it will // loop back to the beginning ad nauseam until it's sent // exactly the number of bytes told to. As such, we need to @@ -48,7 +48,7 @@ func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) { remain = fi.Size() } - // The other quirk with FreeBSD/DragonFly/Solaris's sendfile + // The other quirk with Darwin/FreeBSD/DragonFly/Solaris's sendfile // implementation is that it doesn't use the current position // of the file -- if you pass it offset 0, it starts from // offset 0. There's no way to tell it "start from current