[sys] cpu: handle vendor suffixes in parseRelease

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Jun 30, 2026, 1:07:41 PM (23 hours ago) Jun 30
to 安龙, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Junyang Shao, Dmitri Shuralyov, Dmitri Shuralyov, golang...@luci-project-accounts.iam.gserviceaccount.com, Jorropo, golang-co...@googlegroups.com

Gopher Robot submitted the change

Unreviewed changes

2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

Commit message:
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 <brad...@golang.org>
Change-Id: I41f8fd0a1d6c012eebd5368e623b42e99220d1a3
Reviewed-by: Jorropo <jorro...@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Auto-Submit: Dmitri Shuralyov <dmit...@golang.org>
Reviewed-by: Junyang Shao <shaoj...@google.com>
Files:
  • M cpu/parse.go
  • M cpu/parse_test.go
Change size: M
Delta: 2 files changed, 47 insertions(+), 26 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sys
Gerrit-Branch: master
Gerrit-Change-Id: I41f8fd0a1d6c012eebd5368e623b42e99220d1a3
Gerrit-Change-Number: 793760
Gerrit-PatchSet: 5
Gerrit-Owner: 安龙 <aisk...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
Gerrit-Reviewer: Junyang Shao <shaoj...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages