Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | internal/syscall/unix: KernelVersion nitpicks | Kir Kolyshkin | 2022-09-05 | 1 | -6/+6 |
| | | | | | | | | | | | A few minor improvements for KernelVersion for the sake of readability. Change-Id: I06d2df60ecee8ee0ae603952470fb73e7dcd5d74 Reviewed-on: https://go-review.googlesource.com/c/go/+/427676 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> | ||||
* | internal/syscall/unix: simplify KernelVersion | Kir Kolyshkin | 2022-09-05 | 1 | -9/+2 |
| | | | | | | | | | | | | Since values[2] elements are initialized with 0, the switch statement doesn't do anything. Remove it. Change-Id: I41176692cdf0c01fe8e85315f0c0dc8b0f3d41fd Reviewed-on: https://go-review.googlesource.com/c/go/+/427675 Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> | ||||
* | internal/syscall/unix: consolidate kernelVersion implementations | Kir Kolyshkin | 2022-09-03 | 1 | -0/+49 |
Currently, there are 3 functions returning Linux kernel version numbers. Two of them are identical: - in net, initially added by commit 0a9dd47dd817904e; - in internal/poll, initially added by commit 1c7650aa93bd53; (both were later fixed by commit 66c02645062561a). The third one is a more complex, regexp-based implementation in runtime/pprof, which is only used for a test. Instead of adding one more, let's consolidate existing ones. Remove the complex implementation, and move the simple one into internal/syscall/unix. Use it from all the three places mentioned above. Change-Id: I4a34d9ca47257743c16def30e4dd634e36056091 Reviewed-on: https://go-review.googlesource.com/c/go/+/424896 Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Kirill Kolyshkin <kolyshkin@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> |