Skip to content

Commit

Permalink
rdcore/rootmap: properly handle linear md devices
Browse files Browse the repository at this point in the history
Devices that report type "linear" are md devices, even though the type
doesn't start with "raid".
  • Loading branch information
bgilbert committed Nov 30, 2021
1 parent 039fadb commit 04e4d12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/rdcore/rootmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn device_to_kargs(root: &Mount, device: PathBuf) -> Result<Option<Vec<String>>>
.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)?))
Expand Down

0 comments on commit 04e4d12

Please sign in to comment.