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

Add f2fs support #36

Merged
merged 1 commit into from
Sep 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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