diff options
author | Liwei Song <liwei.song@windriver.com> | 2019-10-21 13:33:05 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-10-23 16:26:15 +0100 |
commit | a5a987ff5e5e333e28be44a12e729907272ea3cb (patch) | |
tree | aee22c403a5e28ffacfb1e620e0b00392cb15670 /meta/recipes-core/util-linux/util-linux | |
parent | c94bb5b7431af8b495a3fa96e96d968dc45fb4f3 (diff) | |
download | openembedded-core-contrib-a5a987ff5e5e333e28be44a12e729907272ea3cb.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.
Signed-off-by: Liwei Song <liwei.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux')
-rw-r--r-- | meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch | 36 |
1 files changed, 36 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 @@ +From e3bb9bfb76c17b1d05814436ced62c05c4011f48 Mon Sep 17 00:00:00 2001 +From: Karel Zak <kzak@redhat.com> +Date: Thu, 27 Jun 2019 09:22:18 +0200 +Subject: [PATCH] lsblk: force to print PKNAME for partition + +PKNAME (parent kernel device name) is based on printed tree according +to parent -> child relationship. The tree is optional and not printed +if partition specified (.e.g "lsblk -o+PKNAME /dev/sda1"), but old +versions print the PKNAME also in this case. + +Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/e3bb9bfb76c17b1d05814436ced62c05c4011f48] + +Addresses: https://github.com/karelzak/util-linux/issues/813 +Signed-off-by: Karel Zak <kzak@redhat.com> +Signed-off-by: Liwei Song <liwei.song@windriver.com> +--- + misc-utils/lsblk.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c +index e95af7af0256..3ce6da730264 100644 +--- a/misc-utils/lsblk.c ++++ b/misc-utils/lsblk.c +@@ -1019,6 +1019,9 @@ static void device_to_scols( + DBG(DEV, ul_debugobj(dev, "add '%s' to scols", dev->name)); + ON_DBG(DEV, if (ul_path_isopen_dirfd(dev->sysfs)) ul_debugobj(dev, " %s ---> is open!", dev->name)); + ++ if (!parent && dev->wholedisk) ++ parent = dev->wholedisk; ++ + /* Do not print device more than one in --list mode */ + if (!(lsblk->flags & LSBLK_TREE) && dev->is_printed) + return; +-- +2.17.1 + |