mirror of
https://github.com/CachyOS/New-Cli-Installer.git
synced 2025-01-23 22:42:31 +08:00
🧹 drop some filesystems
This commit is contained in:
parent
4a13ed14d5
commit
948a433dcf
19
src/disk.cpp
19
src/disk.cpp
@ -221,10 +221,6 @@ void select_filesystem(const std::string_view& file_sys) noexcept {
|
||||
#ifdef NDEVENV
|
||||
utils::exec("modprobe btrfs");
|
||||
#endif
|
||||
} else if (file_sys == "ext2") {
|
||||
config_data["FILESYSTEM"] = "mkfs.ext2 -q";
|
||||
} else if (file_sys == "ext3") {
|
||||
config_data["FILESYSTEM"] = "mkfs.ext3 -q";
|
||||
} else if (file_sys == "ext4") {
|
||||
config_data["FILESYSTEM"] = "mkfs.ext4 -q";
|
||||
config_data["fs_opts"] = std::vector<std::string>{"data=journal", "data=writeback", "dealloc", "discard", "noacl", "noatime", "nobarrier", "nodelalloc"};
|
||||
@ -234,22 +230,11 @@ void select_filesystem(const std::string_view& file_sys) noexcept {
|
||||
#ifdef NDEVENV
|
||||
utils::exec("modprobe f2fs");
|
||||
#endif
|
||||
} else if (file_sys == "jfs") {
|
||||
config_data["FILESYSTEM"] = "mkfs.jfs -q";
|
||||
config_data["fs_opts"] = std::vector<std::string>{"discard", "errors=continue", "errors=panic", "nointegrity"};
|
||||
} else if (file_sys == "nilfs2") {
|
||||
config_data["FILESYSTEM"] = "mkfs.nilfs2 -fq";
|
||||
config_data["fs_opts"] = std::vector<std::string>{"discard", "nobarrier", "errors=continue", "errors=panic", "order=relaxed", "order=strict", "norecovery"};
|
||||
} else if (file_sys == "ntfs") {
|
||||
config_data["FILESYSTEM"] = "mkfs.ntfs -q";
|
||||
} else if (file_sys == "reiserfs") {
|
||||
config_data["FILESYSTEM"] = "mkfs.reiserfs -q";
|
||||
config_data["fs_opts"] = std::vector<std::string>{"acl", "nolog", "notail", "replayonly", "user_xattr"};
|
||||
} else if (file_sys == "vfat") {
|
||||
config_data["FILESYSTEM"] = "mkfs.vfat -F32";
|
||||
} else if (file_sys == "xfs") {
|
||||
config_data["FILESYSTEM"] = "mkfs.xfs -f";
|
||||
config_data["fs_opts"] = std::vector<std::string>{"discard", "filestreams", "ikeep", "largeio", "noalign", "nobarrier", "norecovery", "noquota", "wsync"};
|
||||
} else if (file_sys != "zfs") {
|
||||
spdlog::error("Invalid filesystem ('{}')!", fs_sys);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,6 @@ void select_filesystem() noexcept {
|
||||
const std::vector<std::string> menu_entries = {
|
||||
"ext4",
|
||||
"btrfs",
|
||||
"f2fs",
|
||||
"xfs",
|
||||
};
|
||||
|
||||
@ -46,6 +45,11 @@ void select_filesystem() noexcept {
|
||||
const auto& src = menu_entries[static_cast<std::size_t>(selected)];
|
||||
const auto& lines = utils::make_multiline(src, false, " ");
|
||||
const auto& file_sys = lines[0];
|
||||
/*if (file_sys == "zfs") {
|
||||
// NOTE: We don't have automatic zfs partitioning,
|
||||
// in HEADLESS mode.
|
||||
tui::zfs_auto();
|
||||
}*/
|
||||
utils::select_filesystem(file_sys.c_str());
|
||||
success = true;
|
||||
screen.ExitLoopClosure()();
|
||||
|
@ -943,15 +943,8 @@ bool select_filesystem() noexcept {
|
||||
const std::vector<std::string> menu_entries = {
|
||||
"Do not format -",
|
||||
"btrfs mkfs.btrfs -f",
|
||||
"ext2 mkfs.ext2 -q",
|
||||
"ext3 mkfs.ext3 -q",
|
||||
"ext4 mkfs.ext4 -q",
|
||||
"f2fs mkfs.f2fs -q",
|
||||
"jfs mkfs.jfs -q",
|
||||
"nilfs2 mkfs.nilfs2 -fq",
|
||||
"ntfs mkfs.ntfs -q",
|
||||
"reiserfs mkfs.reiserfs -q",
|
||||
"vfat mkfs.vfat -F32",
|
||||
"xfs mkfs.xfs -f",
|
||||
};
|
||||
|
||||
|
@ -19,6 +19,10 @@ void install_base() noexcept;
|
||||
void install_desktop() noexcept;
|
||||
void install_bootloader() noexcept;
|
||||
|
||||
// TODO(vnepogodin): make it HEADLESS.
|
||||
// Also we should move zfs creation related code to disk.cpp
|
||||
void zfs_auto() noexcept;
|
||||
|
||||
void init() noexcept;
|
||||
} // namespace tui
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user