Skip to content

Commit

Permalink
installer/partitions: Support formatting xfs + f2fs
Browse files Browse the repository at this point in the history
Signed-off-by: Ikey Doherty <[email protected]>
  • Loading branch information
ikeycode committed Dec 21, 2024
1 parent f4a7ce7 commit 905c89e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/installer/src/steps/partitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ impl<'a> FormatPartition<'a> {
pub(super) fn execute(&self, context: &impl Context<'a>) -> Result<(), super::Error> {
let fs = self.filesystem.to_lowercase();
let (exec, args) = match fs.as_str() {
"ext4" => ("mkfs.ext4", [&self.partition.path.display().to_string()]),
"ext4" => ("mkfs.ext4", ["-F", &self.partition.path.display().to_string()]),
"xfs" => ("mkfs.xfs", ["-f", &self.partition.path.display().to_string()]),
"f2fs" => ("mkfs.f2fs", ["-f", &self.partition.path.display().to_string()]),
_ => unimplemented!(),
};
log::info!("Formatting {} as {}", self.partition.path.display(), self.filesystem);
Expand Down

0 comments on commit 905c89e

Please sign in to comment.