summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorLiwei Song <liwei.song@windriver.com>2019-10-21 13:33:05 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-29 09:08:18 +0000
commit4094715887a4200c1fe414fa8de505d77eb57f3b (patch)
tree5235ac4247067b7d0ff69dcfb29edf7006e3ce61 /meta/recipes-core
parent811c957332e93eca72fe41b7f247ec782cb498a9 (diff)
downloadpoky-4094715887a4200c1fe414fa8de505d77eb57f3b.tar.gz
util-linux: fix PKNAME name is NULL when use lsblk [LIN1019-2963]
PKNAME is NULL when run "lsblk -o+PKNAME /dev/sda1" backport an upstream patch to fix it. (From OE-Core rev: dba4cc01463c2edad29f6f8c854b298255cc7562) Signed-off-by: Liwei Song <liwei.song@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a5a987ff5e5e333e28be44a12e729907272ea3cb) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch36
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.34.bb1
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch b/meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch
new file mode 100644
index 0000000000..5d4c148fb3
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch
@@ -0,0 +1,36 @@
1From e3bb9bfb76c17b1d05814436ced62c05c4011f48 Mon Sep 17 00:00:00 2001
2From: Karel Zak <kzak@redhat.com>
3Date: Thu, 27 Jun 2019 09:22:18 +0200
4Subject: [PATCH] lsblk: force to print PKNAME for partition
5
6PKNAME (parent kernel device name) is based on printed tree according
7to parent -> child relationship. The tree is optional and not printed
8if partition specified (.e.g "lsblk -o+PKNAME /dev/sda1"), but old
9versions print the PKNAME also in this case.
10
11Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/e3bb9bfb76c17b1d05814436ced62c05c4011f48]
12
13Addresses: https://github.com/karelzak/util-linux/issues/813
14Signed-off-by: Karel Zak <kzak@redhat.com>
15Signed-off-by: Liwei Song <liwei.song@windriver.com>
16---
17 misc-utils/lsblk.c | 3 +++
18 1 file changed, 3 insertions(+)
19
20diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
21index e95af7af0256..3ce6da730264 100644
22--- a/misc-utils/lsblk.c
23+++ b/misc-utils/lsblk.c
24@@ -1019,6 +1019,9 @@ static void device_to_scols(
25 DBG(DEV, ul_debugobj(dev, "add '%s' to scols", dev->name));
26 ON_DBG(DEV, if (ul_path_isopen_dirfd(dev->sysfs)) ul_debugobj(dev, " %s ---> is open!", dev->name));
27
28+ if (!parent && dev->wholedisk)
29+ parent = dev->wholedisk;
30+
31 /* Do not print device more than one in --list mode */
32 if (!(lsblk->flags & LSBLK_TREE) && dev->is_printed)
33 return;
34--
352.17.1
36
diff --git a/meta/recipes-core/util-linux/util-linux_2.34.bb b/meta/recipes-core/util-linux/util-linux_2.34.bb
index 262f4bacb0..e9c2d80e90 100644
--- a/meta/recipes-core/util-linux/util-linux_2.34.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.34.bb
@@ -7,6 +7,7 @@ SRC_URI += "file://configure-sbindir.patch \
7 file://run-ptest \ 7 file://run-ptest \
8 file://display_testname_for_subtest.patch \ 8 file://display_testname_for_subtest.patch \
9 file://avoid_parallel_tests.patch \ 9 file://avoid_parallel_tests.patch \
10 file://0001-lsblk-force-to-print-PKNAME-for-partition.patch \
10" 11"
11SRC_URI[md5sum] = "a78cbeaed9c39094b96a48ba8f891d50" 12SRC_URI[md5sum] = "a78cbeaed9c39094b96a48ba8f891d50"
12SRC_URI[sha256sum] = "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5" 13SRC_URI[sha256sum] = "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5"