Closed tabraham closed 2 years ago
Maybe use atoll while at it?
Also for atol conversion the prinf format specifier should be %ld
on 64bit long and long long is the same sizeof(char) 1, sizeof(int) 4, sizeof(long) 8, sizeof(long long) 8 but on 32bit int and long is the same sizeof(char) 1, sizeof(int) 4, sizeof(long) 4, sizeof(long long) 8 and powerpc-utils can technically be compiled for 32bit
LGTM
Thanks
Need a Signed-off-by:
@tabraham ?
Sorry for the delay. I missed seeing this.
On systems with more than 2TB of online memory, legacy mode will calculate and report a negative value due to exceeding the maximum value for a signed 32-bit integer:
$ lparstat -i | grep "Online Memory" Online Memory : 3771084032 kB
$ lparstat -il | grep "Online Memory" Online Memory : -511604 MB