diff options
| author | Franck Cuny <franck@fcuny.net> | 2024-12-28 13:48:50 -0800 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2024-12-28 13:48:50 -0800 |
| commit | 1cf606e5286eaef939fb93c228de40f93d9c8632 (patch) | |
| tree | aa94b89db777e4914ff0028e5fed7e6d499df80a /src | |
| parent | document the public types (diff) | |
| download | x-1cf606e5286eaef939fb93c228de40f93d9c8632.tar.gz | |
use a constant value for the path to sysctl
Diffstat (limited to 'src')
| -rw-r--r-- | src/apple_silicon/src/soc.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/apple_silicon/src/soc.rs b/src/apple_silicon/src/soc.rs index 17ff323..43a29ba 100644 --- a/src/apple_silicon/src/soc.rs +++ b/src/apple_silicon/src/soc.rs @@ -29,8 +29,10 @@ impl SocInfo { } // https://github.com/tlkh/asitop/blob/74ebe2cbc23d5b1eec874aebb1b9bacfe0e670cd/asitop/utils.py#L94 +const SYSCTL_PATH: &str = "/usr/sbin/sysctl"; + fn cpu_info() -> Result<(String, u16)> { - let binary = "/usr/sbin/sysctl"; + let binary = SYSCTL_PATH; let args = &[ // don't display the variable name "-n", |
