Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
Add f2fs support
Browse files Browse the repository at this point in the history
  • Loading branch information
axtloss authored and Michal committed Sep 12, 2022
1 parent f74fd5e commit 7914d49
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/functions/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 7914d49

Please sign in to comment.