mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-27 20:36:31 -04:00
cpu: remove the use of ioutil
A trivial change. Change-Id: I8121c263d5b8e9d0634d4f38847aff3cb770ef96 Reviewed-on: https://go-review.googlesource.com/c/sys/+/526301 Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Kirill Kolyshkin <kolyshkin@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
committed by
Gopher Robot
parent
5a17ddab9a
commit
f3ef2d1cfa
+2
-2
@@ -5,7 +5,7 @@
|
|||||||
package cpu
|
package cpu
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -39,7 +39,7 @@ func readHWCAP() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
buf, err := ioutil.ReadFile(procAuxv)
|
buf, err := os.ReadFile(procAuxv)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// e.g. on android /proc/self/auxv is not accessible, so silently
|
// e.g. on android /proc/self/auxv is not accessible, so silently
|
||||||
// ignore the error and leave Initialized = false. On some
|
// ignore the error and leave Initialized = false. On some
|
||||||
|
|||||||
Reference in New Issue
Block a user