]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lscpu: Use 4K buffer size instead of BUFSIZ
authorKhem Raj <raj.khem@gmail.com>
Fri, 15 Sep 2023 07:18:18 +0000 (00:18 -0700)
committerKhem Raj <raj.khem@gmail.com>
Fri, 15 Sep 2023 22:38:59 +0000 (15:38 -0700)
commit2681f560da427fe8bb2ccf5b49c81f356add46f1
treef62bb4e831aefda2195b41d125bc8f4caa95fed0
parentc89edac5c300a254dd9be09191702b9e5c8c536f
lscpu: Use 4K buffer size instead of BUFSIZ

Some lines in /proc/cpuinfo can be large e.g. flags and can then
truncate them in displaying them

BUFSIZ can vary quite a bit  e.g. glibc/linux systems its 8192
but on musl/linux and OSX its 1024, on mingW it is 256, some tests e.g.
x86_64-64cpu-linux6.2.tar.gz has added really long line for cpu flags
line which is greater than 1024 characters and hence this test fails
on musl because lscpu -s reports truncated string

Fixes x86_64-64cpu-linux6.2 tests

Signed-off-by: Khem Raj <raj.khem@gmail.com>
s
sys-utils/lscpu-cputype.c