diff --git a/backport-lsblk-use-md-as-fallback-TYPE-when-md-level-empty.patch b/backport-lsblk-use-md-as-fallback-TYPE-when-md-level-empty.patch new file mode 100644 index 0000000000000000000000000000000000000000..c52520ff3781804312f03a7de94b181dbc540ba0 --- /dev/null +++ b/backport-lsblk-use-md-as-fallback-TYPE-when-md-level-empty.patch @@ -0,0 +1,25 @@ +From 6bed45b965b22c8ea5c10c43320c19cf84fd8cfa Mon Sep 17 00:00:00 2001 +From: codefiles <11915375+codefiles@users.noreply.github.com> +Date: Wed, 3 Sep 2025 08:41:25 +0800 +Subject: [PATCH] lsblk: use md as fallback TYPE when md/level empty + +--- + misc-utils/lsblk.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c +index c132274..55ec653 100644 +--- a/misc-utils/lsblk.c ++++ b/misc-utils/lsblk.c +@@ -425,7 +425,7 @@ static char *get_type(struct lsblk_device *dev) + char *md_level = NULL; + + ul_path_read_string(dev->sysfs, &md_level, "md/level"); +- res = md_level ? md_level : xstrdup("md"); ++ res = (md_level && *md_level) ? md_level : xstrdup("md"); + + } else { + const char *type = NULL; +-- +2.43.0 + diff --git a/util-linux.spec b/util-linux.spec index 1bce9f30dba48d5a85913739ddad4a9042b47729..d32996352513b4f193343e6de48594e96fef3de0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Name: util-linux Version: 2.35.2 -Release: 22 +Release: 23 Summary: A random collection of Linux utilities License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git @@ -92,6 +92,7 @@ Patch6012: backport-include-c.h-add-helpers-for-unaligned-structure-acce.pa Patch6013: backport-libblkid-drbd-reduce-false-positive.patch Patch6014: backport-libfdisk-fix-fdisk_reread_changes-for-extended-partitions.patch Patch6015: backport-mkfs.bfs-fix-memory-leaks-and-weak-code.patch +Patch6016: backport-lsblk-use-md-as-fallback-TYPE-when-md-level-empty.patch Patch9000: Add-check-to-resolve-uname26-version-test-failed.patch Patch9001: modify-rescuemode-chinese-error.patch @@ -450,6 +451,12 @@ fi %{_mandir}/man8/{swapoff.8*,swapon.8*,switch_root.8*,umount.8*,wdctl.8.gz,wipefs.8*,zramctl.8*} %changelog +* Wed Sep 03 2025 cenhuilin - 2.35.2-23 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:lsblk: use md as fallback TYPE when md/level empty + * Thu Aug 07 2025 cenhuilin - 2.35.2-22 - Type:bugfix - CVE:NA