]> Cypherpunks repositories - gostls13.git/commitdiff
os: update the linux minimal version and fix a typo for zero-copy
authorAndy Pan <i@andypan.me>
Thu, 29 Aug 2024 04:58:35 +0000 (12:58 +0800)
committerGopher Robot <gobot@golang.org>
Tue, 3 Sep 2024 15:44:06 +0000 (15:44 +0000)
Change-Id: Ia6a2768be0e044112831c278d88ff31ba3caa9f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/609298
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/os/zero_copy_freebsd.go
src/os/zero_copy_linux.go

index 4751ca46be1d6a688fb35883417ab543ead3cf77..aacfe8610571ac722c52d90eec2496da2c22f629 100644 (file)
@@ -16,7 +16,7 @@ func (f *File) writeTo(w io.Writer) (written int64, handled bool, err error) {
 }
 
 func (f *File) readFrom(r io.Reader) (written int64, handled bool, err error) {
-       // copy_file_range(2) doesn't supports destinations opened with
+       // copy_file_range(2) doesn't support destinations opened with
        // O_APPEND, so don't bother to try zero-copy with these system calls.
        //
        // Visit https://man.freebsd.org/cgi/man.cgi?copy_file_range(2)#ERRORS for details.
index 42e05d4e1f8536d67654575c717acfdef547b93b..0c9a8beb7ed2cf16008b1d7be35cdf39def44c3c 100644 (file)
@@ -139,7 +139,7 @@ func (f *File) copyFile(r io.Reader) (written int64, handled bool, err error) {
 
        // We can employ sendfile(2) when copy_file_range(2) fails to handle the copy.
        // sendfile(2) enabled file-to-file copying since Linux 2.6.33 and Go requires
-       // Linux 3.17 or later, so we're good to go.
+       // Linux 3.2 or later, so we're good to go.
        // Check out https://man7.org/linux/man-pages/man2/sendfile.2.html#DESCRIPTION for more details.
        rerr := sc.Read(func(fd uintptr) bool {
                written, err, handled = poll.SendFile(&f.pfd, int(fd), remain)