summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux/util-linux/0001-lscpu-Use-4K-buffer-size-instead-of-BUFSIZ.patch
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2024-01-03 12:42:06 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-09 22:59:28 +0000
commitcf7152a4cb4c5796de79ade23f348b431a81f544 (patch)
tree1b24056d0a44354f83ed306ed8648a871b7049b0 /meta/recipes-core/util-linux/util-linux/0001-lscpu-Use-4K-buffer-size-instead-of-BUFSIZ.patch
parent070aa227057e4913cf77c2465393a5a8398d5641 (diff)
downloadpoky-cf7152a4cb4c5796de79ade23f348b431a81f544.tar.gz
util-linux/util-linux-libuuid: ugprade from 2.39.2 to 2.39.3
License-Update: =============== GPL-1.0-or-later is added. fdisk.c is licensed under it. 0001-lscpu-Use-4K-buffer-size-instead-of-BUFSIZ.patch is dropped as it's been in the new version. (From OE-Core rev: 9a0bd46e6988b2da446f89864131639dde63c6d0) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux/0001-lscpu-Use-4K-buffer-size-instead-of-BUFSIZ.patch')
-rw-r--r--meta/recipes-core/util-linux/util-linux/0001-lscpu-Use-4K-buffer-size-instead-of-BUFSIZ.patch38
1 files changed, 0 insertions, 38 deletions
diff --git a/meta/recipes-core/util-linux/util-linux/0001-lscpu-Use-4K-buffer-size-instead-of-BUFSIZ.patch b/meta/recipes-core/util-linux/util-linux/0001-lscpu-Use-4K-buffer-size-instead-of-BUFSIZ.patch
deleted file mode 100644
index 4d7487c4f7..0000000000
--- a/meta/recipes-core/util-linux/util-linux/0001-lscpu-Use-4K-buffer-size-instead-of-BUFSIZ.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 95b0405338440cf5cd6d4b2b5c66cda8bf381b28 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 15 Sep 2023 00:18:18 -0700
4Subject: [PATCH] lscpu: Use 4K buffer size instead of BUFSIZ
5
6Some lines in /proc/cpuinfo can be large e.g. flags and can then
7truncate them in displaying them
8
9BUFSIZ can vary quite a bit e.g. glibc/linux systems its 8192
10but on musl/linux and OSX its 1024, on mingW it is 256, some tests e.g.
11x86_64-64cpu-linux6.2.tar.gz has added really long line for cpu flags
12line which is greater than 1024 characters and hence this test fails
13on musl because lscpu -s reports truncated string
14
15Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/2492]
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 sys-utils/lscpu-cputype.c | 4 +++-
19 1 file changed, 3 insertions(+), 1 deletion(-)
20
21diff --git a/sys-utils/lscpu-cputype.c b/sys-utils/lscpu-cputype.c
22index 3fd5f7a3c..c8f72ab8a 100644
23--- a/sys-utils/lscpu-cputype.c
24+++ b/sys-utils/lscpu-cputype.c
25@@ -462,7 +462,9 @@ static int cpuinfo_parse_cache(struct lscpu_cxt *cxt, int keynum, char *data)
26 int lscpu_read_cpuinfo(struct lscpu_cxt *cxt)
27 {
28 FILE *fp;
29- char buf[BUFSIZ];
30+ /* Used to be BUFSIZ which is small on some platforms e.g, musl,
31+ * therefore hardcode to 4K */
32+ char buf[4096];
33 size_t i;
34 struct lscpu_cputype *ct;
35 struct cpuinfo_parser _pr = { .cxt = cxt }, *pr = &_pr;
36--
372.42.0
38