From 7bf8592c50e17db9ec3bec041608ff2ab44e7012 Mon Sep 17 00:00:00 2001 From: axtloss Date: Mon, 12 Sep 2022 20:37:26 +0200 Subject: [PATCH] Add f2fs support --- src/functions/partition.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/functions/partition.rs b/src/functions/partition.rs index 1b68607..a5aa200 100755 --- a/src/functions/partition.rs +++ b/src/functions/partition.rs @@ -5,7 +5,7 @@ use crate::internal::*; use std::path::{Path, PathBuf}; /*mkfs.bfs mkfs.cramfs mkfs.ext3 mkfs.fat mkfs.msdos mkfs.xfs -mkfs.btrfs mkfs.ext2 mkfs.ext4 mkfs.minix mkfs.vfat */ +mkfs.btrfs mkfs.ext2 mkfs.ext4 mkfs.minix mkfs.vfat mkfs.f2fs */ pub fn fmt_mount(mountpoint: &str, filesystem: &str, blockdevice: &str) { match filesystem { @@ -63,6 +63,10 @@ pub fn fmt_mount(mountpoint: &str, filesystem: &str, blockdevice: &str) { exec("mkfs.minix", vec![String::from(blockdevice)]), format!("Formatting {blockdevice} as minix").as_str(), ), + "f2fs" => exec_eval( + exec("mkfs.f2fs", vec![String::from(blockdevice)]), + format!("Formatting {blockdevice} as f2fs").as_str(), + ), "don't format" => { log::debug!("Not formatting {}", blockdevice); }