]> 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)
committerKarel Zak <kzak@redhat.com>
Fri, 24 Nov 2023 09:41:23 +0000 (10:41 +0100)
commita711af02d32c0a0a31f1bbb943ffff2e94203e86
tree3065383f53d592971d68d7d141d910b9188e2310
parent45c6136cba5f7607cca08c5aaab8e9b22ef87c25
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