Skip to content

SystemInformation: Improve ParseSysCtl error checking for better Apple Silicon support

Sean McBride requested to merge seanm/kwsys:sysctl-error-checking into master
  • ensure the return value of every sysctlbyname call is checked. On Apple Silicon aka arm64 some of them do return an error, for example hw.cpufrequency, and we were getting nonsense values.
  • when sysctlbyname returns an error, always provide a fallback value
  • be a bit more paranoid about leaving space for null termination in temp buffer
  • corrected "machdep.cpu.model" and "machdep.cpu.stepping" from int64 to int32, as documented.
  • added Apple to the Manufacturer enum
Edited by Brad King

Merge request reports

Loading