From 04e4d12bf2c9da0c25983b8c1e72920239b63ec1 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Mon, 29 Nov 2021 21:45:02 -0500 Subject: [PATCH] rdcore/rootmap: properly handle linear md devices Devices that report type "linear" are md devices, even though the type doesn't start with "raid". --- src/bin/rdcore/rootmap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/rdcore/rootmap.rs b/src/bin/rdcore/rootmap.rs index 070672c0d..466c98010 100644 --- a/src/bin/rdcore/rootmap.rs +++ b/src/bin/rdcore/rootmap.rs @@ -105,7 +105,7 @@ fn device_to_kargs(root: &Mount, device: PathBuf) -> Result>> .get("TYPE") .with_context(|| format!("missing TYPE for {}", device.display()))?; // a `match {}` construct would be nice here, but for RAID it's a prefix match - if blktype.starts_with("raid") { + if blktype.starts_with("raid") || blktype == "linear" { Ok(Some(get_raid_kargs(&device)?)) } else if blktype == "crypt" { Ok(Some(get_luks_kargs(root, &device)?))