procps/library
Jim Warner 133a833942 library: become more tolerant of /proc/cpuinfo formats
In the issue referenced below, it is now apparent that
not all architectures follow a logical/expected format
for the /proc/cpuinfo file. Specifically, the expected
empty line after each processor entry might be missing
under some architectures for the last processor shown.

[ and a belated review of kernel source confirms it. ]

So this commit makes our stat module a little bit more
tolerant of some potential missing newline characters.

[ along the way, it's also now tolerant of a missing ]
[ cpuinfo file plus more efficient whenever a cpu is ]
[ is not linked to a core or toggled offline/online. ]

Reference(s):
https://gitlab.com/procps-ng/procps/-/issues/272
procps-ng/procps#272

Signed-off-by: Jim Warner <james.warner@comcast.net>
2023-03-02 19:38:41 +11:00
..
include misc: tweak the recent copyright changes just a little 2023-02-14 07:11:51 +11:00
tests tests: Fix type for check_fatal_proc_unmounted 2022-12-06 22:23:08 +11:00
.gitignore build-sys: Relocate library to library/ 2022-08-29 19:02:44 +10:00
COPYING build-sys: Relocate library to library/ 2022-08-29 19:02:44 +10:00
devname.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
diskstats.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
escape.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
libproc2.pc.in misc: Update pc file to new library name 2022-08-29 20:42:45 +10:00
libproc2.sym library: Rename to libproc2 2022-08-29 20:38:17 +10:00
meminfo.c misc: tweak the recent copyright changes just a little 2023-02-14 07:11:51 +11:00
namespace.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
numa.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
pids.c misc: tweak the recent copyright changes just a little 2023-02-14 07:11:51 +11:00
pwcache.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
readproc.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
slabinfo.c misc: tweak the recent copyright changes just a little 2023-02-14 07:11:51 +11:00
stat.c library: become more tolerant of /proc/cpuinfo formats 2023-03-02 19:38:41 +11:00
sysinfo.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
uptime.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
version.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
vmstat.c misc: tweak the recent copyright changes just a little 2023-02-14 07:11:51 +11:00
wchan.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00