summaryrefslogtreecommitdiffhomepage
path: root/tooling/mkfs.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-07-04 15:43:44 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-07-04 15:43:44 +0200
commit32edc6508c91e51316d67b92eb86b4e72d0a41a4 (patch)
treedfdd7eda6c5d88ca9b9b0a4a34beb8d9962409bb /tooling/mkfs.h
parent13e1137757626d274e7754d54e7db828da1e7fa8 (diff)
feat: libmkfs: a new library to format filesystem and utilities for
them. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'tooling/mkfs.h')
-rw-r--r--tooling/mkfs.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/tooling/mkfs.h b/tooling/mkfs.h
deleted file mode 100644
index 7180b179..00000000
--- a/tooling/mkfs.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <tooling/rang.h>
-#include <iostream>
-#include <string>
-
-/// @internal
-namespace mkfs {
-/// @brief Helper function to get the option value from command line arguments.
-template <typename CharType>
-inline std::basic_string<CharType> get_option(const std::basic_string<CharType>& args,
- const std::basic_string<CharType>& 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<CharType>{};
-}
-
-inline auto console_out() -> std::ostream& {
- std::ostream& conout = std::cout;
- conout << rang::fg::red << "mkfs: " << rang::style::reset;
-
- return conout;
-}
-} // namespace mkfs \ No newline at end of file