🧹 simple_tui: use string_view literals in more places

This commit is contained in:
Vladislav Nepogodin 2024-07-29 00:32:10 +04:00
parent c065c45916
commit 10b51accd5
No known key found for this signature in database
GPG Key ID: B62C3D10C54D5DA9

View File

@ -53,7 +53,7 @@ auto select_filesystem() noexcept -> std::string {
bool success{}; bool success{};
auto ok_callback = [&] { auto ok_callback = [&] {
const auto& file_sys = menu_entries[static_cast<std::size_t>(selected)]; const auto& file_sys = menu_entries[static_cast<std::size_t>(selected)];
/*if (file_sys == "zfs") { /*if (file_sys == "zfs"sv) {
// NOTE: We don't have automatic zfs partitioning, // NOTE: We don't have automatic zfs partitioning,
// in HEADLESS mode. // in HEADLESS mode.
tui::zfs_auto(); tui::zfs_auto();
@ -404,7 +404,7 @@ void menu_simple() noexcept {
} }
// If the root partition is btrfs, offer to create subvolumes // If the root partition is btrfs, offer to create subvolumes
/*if (gucc::fs::utils::get_mountpoint_fs(mountpoint) == "btrfs") { /*if (gucc::fs::utils::get_mountpoint_fs(mountpoint) == "btrfs"sv) {
// Check if there are subvolumes already on the btrfs partition // Check if there are subvolumes already on the btrfs partition
const auto& subvolumes = fmt::format(FMT_COMPILE("btrfs subvolume list \"{}\" 2>/dev/null"), mountpoint); const auto& subvolumes = fmt::format(FMT_COMPILE("btrfs subvolume list \"{}\" 2>/dev/null"), mountpoint);
const auto& subvolumes_count = gucc::utils::exec(fmt::format(FMT_COMPILE("{} | wc -l"), subvolumes)); const auto& subvolumes_count = gucc::utils::exec(fmt::format(FMT_COMPILE("{} | wc -l"), subvolumes));