/* ------------------------------------------- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. ------------------------------------------- */ #include #include #include #include #include /// @internal namespace mkfs::detail { /// @brief Helper function to get the option value from command line arguments. template static std::basic_string get_option(const std::basic_string& args, const std::basic_string& option) { size_t pos = args.find(option + CharType('=')); if (pos != std::string::npos) { size_t start = pos + option.length() + 1; size_t end = args.find(' ', start); return args.substr(start, end - start); } return std::basic_string{}; } } // namespace mkfs::detail static size_t kDiskSize = 1024 * 1024 * 1024 * 4UL; static uint16_t kVersion = kHeFSVersion; static std::u16string kLabel = kHeFSDefaultVoluneName; static size_t kSectorSize = 512; int main(int argc, char** argv) { if (argc < 2) { std::cerr << "mkfs.hefs: Error: Missing required arguments." << std::endl; std::cerr << "mkfs.hefs: Usage: mkfs.hefs -L