From 941e0dfbb41ac539178503351afc0f09de442720 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 2 Mar 2026 14:59:58 +0100 Subject: chore: OpenHeFS and MKFS tweaks. Signed-off-by: Amlal El Mahrouss --- tools/chk.hefs.cc | 76 ---------------- tools/chk.hefs.cpp | 73 ++++++++++++++++ tools/chk.hefs.json | 4 +- tools/libmkfs/mkfs.h | 91 ------------------- tools/libmkfs/mkfs.hpp | 91 +++++++++++++++++++ tools/libmkfs/openhefs.h | 122 -------------------------- tools/libmkfs/openhefs.hpp | 122 ++++++++++++++++++++++++++ tools/mkapp.py | 13 +-- tools/mkfs.hefs.cc | 211 --------------------------------------------- tools/mkfs.hefs.cpp | 211 +++++++++++++++++++++++++++++++++++++++++++++ tools/mkfs.hefs.json | 4 +- 11 files changed, 509 insertions(+), 509 deletions(-) delete mode 100644 tools/chk.hefs.cc create mode 100644 tools/chk.hefs.cpp delete mode 100644 tools/libmkfs/mkfs.h create mode 100644 tools/libmkfs/mkfs.hpp delete mode 100644 tools/libmkfs/openhefs.h create mode 100644 tools/libmkfs/openhefs.hpp delete mode 100644 tools/mkfs.hefs.cc create mode 100644 tools/mkfs.hefs.cpp (limited to 'tools') diff --git a/tools/chk.hefs.cc b/tools/chk.hefs.cc deleted file mode 100644 index cce1c7a9..00000000 --- a/tools/chk.hefs.cc +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/nekernel-org/nekernel - -#include -#include -#include -#include - -/// @note decimal base. -static uint16_t kNumericalBase = 10; - -int main(int argc, char** argv) { - if (argc < 2) { - mkfs::console_out() << "fsck: hefs: usage: chk.hefs -in= -b=" - << "\n"; - return EXIT_FAILURE; - } - - auto args = mkfs::detail::build_args(argc, argv); - - auto opt_disk = mkfs::get_option(args, "in"); - - auto origin = mkfs::get_option(args, "b"); - - if (opt_disk.empty()) { - mkfs::console_out() << "fsck: hefs: error: OpenHeFS partition is empty! Exiting..." - << "\n"; - return EXIT_FAILURE; - } - - auto out_origin = 0UL; - - if (!mkfs::detail::parse_signed(origin, out_origin, kNumericalBase)) { - mkfs::console_out() << "hefs: error: Invalid -org= argument.\n"; - return EXIT_FAILURE; - } - - std::ifstream output_device(opt_disk, std::ios::binary); - - if (!output_device.good()) { - mkfs::console_out() << "hefs: error: Unable to open output device: " << opt_disk << "\n"; - return EXIT_FAILURE; - } - - output_device.seekg(out_origin); - - if (!output_device.good()) { - mkfs::console_out() << "hefs: error: Failed seek to origin.\n"; - return EXIT_FAILURE; - } - - // @note use modern intializer list here to empty out the fields according to the struct layout. - mkfs::hefs::BootNode boot_node{}; - - output_device.read(reinterpret_cast(&boot_node), sizeof(boot_node)); - - if (strncmp(boot_node.magic, kOpenHeFSMagic, kOpenHeFSMagicLen) != 0 || - boot_node.sectorCount < 1 || boot_node.sectorSize < kMkFsSectorSz) { - mkfs::console_out() << "hefs: error: Device does not contain an OpenHeFS disk: " << opt_disk - << "\n"; - return EXIT_FAILURE; - } - - if (boot_node.badSectors > kMkFsMaxBadSectors) { - mkfs::console_out() << "hefs: error: OpenHeFS disk has too much bad sectors: " << opt_disk - << "\n"; - return EXIT_FAILURE; - } - - mkfs::console_out() << "hefs: OpenHeFS partition is healthy. Exiting...\n"; - - output_device.close(); - - return EXIT_SUCCESS; -} diff --git a/tools/chk.hefs.cpp b/tools/chk.hefs.cpp new file mode 100644 index 00000000..d9141f1f --- /dev/null +++ b/tools/chk.hefs.cpp @@ -0,0 +1,73 @@ +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/nekernel-org/nekernel + +#include +#include +#include +#include + +/// @note decimal base. +static uint16_t kNumericalBase = 10; +static auto kMinArgs = 2; + +int main(int argc, char** argv) { + if (argc < kMinArgs) { + mkfs::console_out() << "chk: hefs: usage: chk.hefs -in= -b=" + << "\n"; + return EXIT_FAILURE; + } + + auto args = mkfs::detail::build_args(argc, argv); + auto opt_disk = mkfs::get_option(args, "in"); + auto origin = mkfs::get_option(args, "b"); + + if (opt_disk.empty()) { + mkfs::console_out() << "chk: hefs: error: OpenHeFS partition is empty! Exiting..." + << "\n"; + return EXIT_FAILURE; + } + + auto out_origin = 0UL; + + if (!mkfs::detail::parse_signed(origin, out_origin, kNumericalBase)) { + mkfs::console_out() << "chk: hefs: error: Invalid -org= argument.\n"; + return EXIT_FAILURE; + } + + std::ifstream output_device(opt_disk, std::ios::binary); + + if (!output_device.good()) { + mkfs::console_out() << "chk: hefs: error: Unable to open output device: " << opt_disk << "\n"; + return EXIT_FAILURE; + } + + output_device.seekg(out_origin); + + if (!output_device.good()) { + mkfs::console_out() << "chk: hefs: error: Failed seek to origin.\n"; + return EXIT_FAILURE; + } + + // @note use modern intializer list here to empty out the fields according to the struct layout. + mkfs::hefs::BootNode boot_node{}; + + output_device.read(reinterpret_cast(&boot_node), sizeof(boot_node)); + + if (strncmp(boot_node.magic, kOpenHeFSMagic, kOpenHeFSMagicLen) != 0 || + boot_node.sectorCount < 1 || boot_node.sectorSize < kMkFsSectorSz) { + mkfs::console_out() << "chk: hefs: error: Device does not contain an OpenHeFS disk: " << opt_disk + << "\n"; + return EXIT_FAILURE; + } + + if (boot_node.badSectors > kMkFsMaxBadSectors) { + mkfs::console_out() << "chk: hefs: error: OpenHeFS disk has too much bad sectors: " << opt_disk + << "\n"; + return EXIT_FAILURE; + } + + mkfs::console_out() << "chk: hefs: OpenHeFS partition is healthy. Exiting...\n"; + + return EXIT_SUCCESS; +} diff --git a/tools/chk.hefs.json b/tools/chk.hefs.json index 649c5e7f..5bb665b3 100644 --- a/tools/chk.hefs.json +++ b/tools/chk.hefs.json @@ -5,7 +5,7 @@ "../" ], "sources_path": [ - "chk.hefs.cc" + "chk.hefs.cpp" ], "output_name": "./dist/chk.hefs", "cpp_macros": [ @@ -13,4 +13,4 @@ "kFsckOpenHeFSVersionHighest=0x0100", "kFsckOpenHeFSVersionLowest=0x0100" ] -} \ No newline at end of file +} diff --git a/tools/libmkfs/mkfs.h b/tools/libmkfs/mkfs.h deleted file mode 100644 index 240d7b16..00000000 --- a/tools/libmkfs/mkfs.h +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/nekernel-org/nekernel - -#ifndef LIBMKFS_MKFS_H -#define LIBMKFS_MKFS_H - -#include -#include -#include - -#define kMkFsSectorSz (512U) -#define kMkFsMaxBadSectors (128U) - -/// @internal -namespace mkfs { - -namespace detail { - /// @internal - /// @brief GB‐to‐byte conversion (use multiplication, not XOR). - inline constexpr size_t gib_cast(const std::uint32_t& gb) { - return static_cast(gb) * 1024ULL * 1024ULL * 1024ULL; - } - - /// \brief Parse decimal parameter. - inline bool parse_decimal(const std::string& opt, std::size_t& out) { - if (opt.empty()) return false; - char* endptr = nullptr; - std::size_t val = std::strtoull(opt.c_str(), &endptr, 10); - if (endptr == opt.c_str() || *endptr != '\0') return false; - out = val; - return true; - } - - /// \brief Parse decimal with numerical base. - inline bool parse_signed(const std::string& opt, std::size_t& out, const int& base = 10) { - out = 0L; - - if (opt.empty()) return true; - - char* endptr = nullptr; - long val = std::strtol(opt.c_str(), &endptr, base); - auto err = errno; - - if (err == ERANGE || err == EINVAL) return false; - if (endptr == opt.c_str() || *endptr != '\0') return false; - - out = val; - return true; - } - - /// \brief Helper to build arguments for filesystem tooling. - inline std::string build_args(int argc, char** argv) { - std::string combined; - for (int i = 1; i < argc; ++i) { - combined += argv[i]; - combined += ' '; - } - return combined; - } -} // namespace detail - -/// @brief Helper function to get the option value from command line arguments. -template -inline std::basic_string get_option(const std::basic_string& args, - const std::basic_string& option) { - std::size_t pos = args.find(CharType('-') + option + CharType('=')); - - if (pos != std::basic_string::npos) { - std::size_t start = pos + option.length() + 2; - std::size_t end = args.find(' ', start); - - if (end == std::basic_string::npos || start > args.size()) { - return {}; - } - - return args.substr(start, end - start); - } - - return {}; -} - -inline auto console_out() -> std::ostream& { - std::ostream& conout = std::cout; - conout << rang::fg::red << "mkfs: " << rang::style::reset; - - return conout; -} -} // namespace mkfs - -#endif diff --git a/tools/libmkfs/mkfs.hpp b/tools/libmkfs/mkfs.hpp new file mode 100644 index 00000000..41e79996 --- /dev/null +++ b/tools/libmkfs/mkfs.hpp @@ -0,0 +1,91 @@ +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/nekernel-org/nekernel + +#ifndef LIBMKFS_MKFS_H +#define LIBMKFS_MKFS_H + +#include +#include +#include + +#define kMkFsSectorSz (512U) +#define kMkFsMaxBadSectors (128U) + +/// @internal +namespace mkfs { + +namespace detail { + /// @internal + /// @brief GB‐to‐byte conversion (use multiplication, not XOR). + inline constexpr size_t gib_cast(const std::uint32_t& gb) { + return static_cast(gb) * 1024ULL * 1024ULL * 1024ULL; + } + + /// \brief Parse decimal parameter. + inline bool parse_decimal(const std::string& opt, std::size_t& out) { + if (opt.empty()) return false; + char* endptr = nullptr; + std::size_t val = std::strtoull(opt.c_str(), &endptr, 10); + if (endptr == opt.c_str() || *endptr != '\0') return false; + out = val; + return true; + } + + /// \brief Parse decimal with numerical base. + inline bool parse_signed(const std::string& opt, std::size_t& out, const int& base = 10) { + out = 0L; + + if (opt.empty()) return true; + + char* endptr = nullptr; + long val = std::strtol(opt.c_str(), &endptr, base); + auto err = errno; + + if (err == ERANGE || err == EINVAL) return false; + if (endptr == opt.c_str() || *endptr != '\0') return false; + + out = val; + return true; + } + + /// \brief Helper to build arguments for filesystem tooling. + inline std::string build_args(int argc, char** argv) { + std::string combined; + for (int i = 1; i < argc; ++i) { + combined += argv[i]; + combined += ' '; + } + return combined; + } +} // namespace detail + +/// @brief Helper function to get the option value from command line arguments. +template +inline std::basic_string get_option(const std::basic_string& args, + const std::basic_string& option) { + std::size_t pos = args.find(CharType('-') + option + CharType('=')); + + if (pos != std::basic_string::npos) { + std::size_t start = pos + option.length() + 2; + std::size_t end = args.find(' ', start); + + if (end == std::basic_string::npos || start > args.size()) { + return {}; + } + + return args.substr(start, end - start); + } + + return {}; +} + +inline auto console_out() -> std::ostream& { + std::ostream& conout = std::cout; + conout << rang::fg::red << "mkfs: " << rang::style::reset; + + return conout; +} +} // namespace mkfs + +#endif diff --git a/tools/libmkfs/openhefs.h b/tools/libmkfs/openhefs.h deleted file mode 100644 index 8db113ed..00000000 --- a/tools/libmkfs/openhefs.h +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/nekernel-org/nekernel - -#ifndef LIBMKFS_OPENHEFS_H -#define LIBMKFS_OPENHEFS_H - -#ifndef __GNUC__ -#error !! libmkfs isn't working in MSVC yet !! -#endif - -#include -#include - -#define kOpenHeFSVersion (0x0101) -#define kOpenHeFSMagic "OpenHeFS" -#define kOpenHeFSMagicLen (9U) - -#define kOpenHeFSFileNameLen (256U) -#define kOpenHeFSPartNameLen (128U) - -#define kOpenHeFSDefaultVolumeName u8"OpenHeFS Volume" - -namespace mkfs::hefs { - -// Drive kinds -enum { - kOpenHeFSHardDrive = 0xC0, // Hard Drive - kOpenHeFSSolidStateDrive = 0xC1, // Solid State Drive - kOpenHeFSOpticalDrive = 0x0C, // Blu-Ray/DVD - kOpenHeFSMassStorageDevice = 0xCC, // USB - kOpenHeFSScsiDrive = 0xC4, // SCSI Hard Drive - kOpenHeFSFlashDrive = 0xC6, - kOpenHeFSUnknown = 0xFF, // Unknown device. - kOpenHeFSDriveCount = 8, -}; - -// Disk status -enum { - kOpenHeFSStatusUnlocked = 0x18, - kOpenHeFSStatusLocked, - kOpenHeFSStatusError, - kOpenHeFSStatusInvalid, - kOpenHeFSStatusCount, -}; - -// Encodings -enum { - kOpenHeFSEncodingFlagsUTF8 = 0x50, - kOpenHeFSEncodingFlagsUTF16, - kOpenHeFSEncodingFlagsUTF32, - kOpenHeFSEncodingFlagsUTF16BE, - kOpenHeFSEncodingFlagsUTF16LE, - kOpenHeFSEncodingFlagsUTF32BE, - kOpenHeFSEncodingFlagsUTF32LE, - kOpenHeFSEncodingFlagsUTF8BE, - kOpenHeFSEncodingFlagsUTF8LE, - kOpenHeFSEncodingFlagsBinary, - kOpenHeFSEncodingFlagsCount = 11, - kOpenHeFSFlagsNone = 0, - kOpenHeFSFlagsReadOnly = 0x100, - kOpenHeFSFlagsHidden, - kOpenHeFSFlagsSystem, - kOpenHeFSFlagsArchive, - kOpenHeFSFlagsDevice, - kOpenHeFSFlagsCount = 7 -}; - -// Time type -using ATime = std::uint64_t; - -// File kinds -inline constexpr uint16_t kOpenHeFSFileKindRegular = 0x00; -inline constexpr uint16_t kOpenHeFSFileKindDirectory = 0x01; -inline constexpr uint16_t kOpenHeFSFileKindBlock = 0x02; -inline constexpr uint16_t kOpenHeFSFileKindCharacter = 0x03; -inline constexpr uint16_t kOpenHeFSFileKindFIFO = 0x04; -inline constexpr uint16_t kOpenHeFSFileKindSocket = 0x05; -inline constexpr uint16_t kOpenHeFSFileKindSymbolicLink = 0x06; -inline constexpr uint16_t kOpenHeFSFileKindUnknown = 0x07; -inline constexpr uint16_t kOpenHeFSFileKindCount = 0x08; - -// Red-black tree colors -enum { - kOpenHeFSInvalidColor = 0, - kOpenHeFSRed = 100, - kOpenHeFSBlack, - kOpenHeFSColorCount, -}; - -// Time constants -inline constexpr ATime kOpenHeFSTimeInvalid = 0x0000000000000000; -inline constexpr ATime kOpenHeFSTimeMax = 0xFFFFFFFFFFFFFFFF - 1; - -// Boot Node -struct __attribute__((packed)) BootNode { - char magic[kOpenHeFSMagicLen]{}; - char8_t volumeName[kOpenHeFSPartNameLen]{}; - std::uint32_t version{}; - std::uint64_t badSectors{}; - std::uint64_t sectorCount{}; - std::uint64_t sectorSize{}; - std::uint32_t checksum{}; - std::uint8_t diskKind{}; - std::uint8_t encoding{}; - std::uint64_t startIND{}; - std::uint64_t endIND{}; - std::uint64_t indCount{}; - std::uint64_t diskSize{}; - std::uint16_t diskStatus{}; - std::uint16_t diskFlags{}; - std::uint16_t vid{}; - std::uint64_t startIN{}; - std::uint64_t endIN{}; - std::uint64_t startBlock{}; - std::uint64_t endBlock{}; - char pad[272]{}; -}; - -} // namespace mkfs::hefs - -#endif diff --git a/tools/libmkfs/openhefs.hpp b/tools/libmkfs/openhefs.hpp new file mode 100644 index 00000000..6b77bf1b --- /dev/null +++ b/tools/libmkfs/openhefs.hpp @@ -0,0 +1,122 @@ +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/nekernel-org/nekernel + +#ifndef LIBMKFS_OPENHEFS_H +#define LIBMKFS_OPENHEFS_H + +#ifndef __GNUC__ +#error !! libmkfs isn't working in MSVC yet !! +#endif + +#include +#include + +#define kOpenHeFSVersion (0x0101) +#define kOpenHeFSMagic "OpenHeFS" +#define kOpenHeFSMagicLen (9U) + +#define kOpenHeFSFileNameLen (256U) +#define kOpenHeFSPartNameLen (128U) + +#define kOpenHeFSDefaultVolumeName u8"OpenHeFS Volume" + +namespace mkfs::hefs { + +// Drive kinds +enum { + kOpenHeFSHardDrive = 0xC0, // Hard Drive + kOpenHeFSSolidStateDrive = 0xC1, // Solid State Drive + kOpenHeFSOpticalDrive = 0x0C, // Blu-Ray/DVD + kOpenHeFSMassStorageDevice = 0xCC, // USB + kOpenHeFSScsiDrive = 0xC4, // SCSI Hard Drive + kOpenHeFSFlashDrive = 0xC6, + kOpenHeFSUnknown = 0xFF, // Unknown device. + kOpenHeFSDriveCount = 8, +}; + +// Disk status +enum { + kOpenHeFSStatusUnlocked = 0x18, + kOpenHeFSStatusLocked, + kOpenHeFSStatusError, + kOpenHeFSStatusInvalid, + kOpenHeFSStatusCount, +}; + +// Encodings +enum { + kOpenHeFSEncodingFlagsUTF8 = 0x50, + kOpenHeFSEncodingFlagsUTF16, + kOpenHeFSEncodingFlagsUTF32, + kOpenHeFSEncodingFlagsUTF16BE, + kOpenHeFSEncodingFlagsUTF16LE, + kOpenHeFSEncodingFlagsUTF32BE, + kOpenHeFSEncodingFlagsUTF32LE, + kOpenHeFSEncodingFlagsUTF8BE, + kOpenHeFSEncodingFlagsUTF8LE, + kOpenHeFSEncodingFlagsBinary, + kOpenHeFSEncodingFlagsCount = 11, + kOpenHeFSFlagsNone = 0, + kOpenHeFSFlagsReadOnly = 0x100, + kOpenHeFSFlagsHidden, + kOpenHeFSFlagsSystem, + kOpenHeFSFlagsArchive, + kOpenHeFSFlagsDevice, + kOpenHeFSFlagsCount = 7 +}; + +// Time type +using ATime = std::uint64_t; + +// File kinds +inline constexpr uint16_t kOpenHeFSFileKindRegular = 0x00; +inline constexpr uint16_t kOpenHeFSFileKindDirectory = 0x01; +inline constexpr uint16_t kOpenHeFSFileKindBlock = 0x02; +inline constexpr uint16_t kOpenHeFSFileKindCharacter = 0x03; +inline constexpr uint16_t kOpenHeFSFileKindFIFO = 0x04; +inline constexpr uint16_t kOpenHeFSFileKindSocket = 0x05; +inline constexpr uint16_t kOpenHeFSFileKindSymbolicLink = 0x06; +inline constexpr uint16_t kOpenHeFSFileKindUnknown = 0x07; +inline constexpr uint16_t kOpenHeFSFileKindCount = 0x08; + +// Red-black tree colors +enum { + kOpenHeFSInvalidColor = 0, + kOpenHeFSRed = 100, + kOpenHeFSBlack, + kOpenHeFSColorCount, +}; + +// Time constants +inline constexpr ATime kOpenHeFSTimeInvalid = 0x0000000000000000; +inline constexpr ATime kOpenHeFSTimeMax = 0xFFFFFFFFFFFFFFFF - 1; + +// Boot Node +struct __attribute__((packed)) BootNode { + char magic[kOpenHeFSMagicLen]{}; + char8_t volumeName[kOpenHeFSPartNameLen]{}; + std::uint32_t version{}; + std::uint64_t badSectors{}; + std::uint64_t sectorCount{}; + std::uint64_t sectorSize{}; + std::uint32_t checksum{}; + std::uint8_t diskKind{}; + std::uint8_t encoding{}; + std::uint64_t startIND{}; + std::uint64_t endIND{}; + std::uint64_t indCount{}; + std::uint64_t diskSize{}; + std::uint16_t diskStatus{}; + std::uint16_t diskFlags{}; + std::uint16_t vid{}; + std::uint64_t startIN{}; + std::uint64_t endIN{}; + std::uint64_t startBlock{}; + std::uint64_t endBlock{}; + char pad[272]{}; +}; + +} // namespace mkfs::hefs + +#endif diff --git a/tools/mkapp.py b/tools/mkapp.py index 5f65bfb2..e3128a52 100755 --- a/tools/mkapp.py +++ b/tools/mkapp.py @@ -45,9 +45,7 @@ def create_directory_structure(base_path, project_name): "compiler_path": "clang++", "compiler_std": "c++20", "headers_path": ["./", "../../../src/kernel", "../../../public/frameworks/", "../../../src/", "./"], - "sources_path": [ - - ], + "sources_path": [], "output_name": f"./dist/{project_name}", "cpp_macros": [ "kSampleFWVersion=0x0100", @@ -56,7 +54,7 @@ def create_directory_structure(base_path, project_name): "__NE_SDK__" ] } - + with open(proj_json_path, 'w') as json_file: json.dump(manifest, json_file, indent=4) @@ -67,6 +65,8 @@ def create_directory_structure(base_path, project_name): with open(proj_cpp_path, 'w') as cpp_file_io: cpp_file_io.write(cpp_file) + + if __name__ == "__main__": if len(sys.argv) != 2: print("HELP: mkapp.py ") @@ -74,5 +74,8 @@ if __name__ == "__main__": base_path = os.getcwd() # Use the current working directory as the base path create_directory_structure(base_path, sys.argv[1]) - print("INFO: Application created successfully.") + + + + diff --git a/tools/mkfs.hefs.cc b/tools/mkfs.hefs.cc deleted file mode 100644 index 879b5668..00000000 --- a/tools/mkfs.hefs.cc +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/nekernel-org/nekernel - -#include -#include -#include -#include -#include -#include -#include - -static std::uint16_t kVersion = kOpenHeFSVersion; -static std::uint16_t kNumericalBase = 10; - -static std::size_t kDiskSize = mkfs::detail::gib_cast(4UL); -static std::u8string kDiskLabel; -static std::size_t kDiskSectorSz = 512; - -int main(int argc, char** argv) { - if (argc != 10) { - mkfs::console_out() - << "hefs: usage: mkfs.hefs -L=