SIGN IN SIGN UP

cpu: handle vendor suffixes in parseRelease

Kernel release strings such as "3.4.35_hi3535" on some Synology devices
failed to parse because only dash and plus suffixes were stripped.
Parse the leading digits of each component instead, mirroring the Go
runtime fix.

This copies the implementation from the Go runtime's parseRelease as
updated in CL 781800.

Fixes golang/go#80094

Co-authored-by: Brad Fitzpatrick <bradfitz@golang.org>
Change-Id: I41f8fd0a1d6c012eebd5368e623b42e99220d1a3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/793760
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
A
An Long committed
9e7e939dcafac07e8ab4cffa6e5fc74908413f00
Parent: f6fb8a1
Committed by Gopher Robot <gobot@golang.org> on 6/30/2026, 5:07:31 PM