From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Sat, 28 Jun 2025 00:53:16 +0000 (-0400) Subject: lsblk: use md as fallback TYPE when md/level empty X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6bed45b965b22c8ea5c10c43320c19cf84fd8cfa;p=thirdparty%2Futil-linux.git lsblk: use md as fallback TYPE when md/level empty --- diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index af6ab0450..4ce45ee5b 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -483,7 +483,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;