diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-18 14:59:05 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-18 14:59:05 +0100 |
| commit | 61236d6fba58fb0edc62ddf39a5ebbff049e2648 (patch) | |
| tree | 9e2809721945f7a095d1af1b2fbf6957d6f6902d | |
| parent | 833a6791c7d67af5643ea977f056ebdda661c8f5 (diff) | |
fix: GfkKit&MKFSLib: inline function inside headers to avoid symbol duplicates (libmkfs) and include DeviceMgr in FB inside GfxKit, remove FB module too from the includes; as it is not necessary and confusing inside GfxKit.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | dev/kernel/GfxKit/FB.h | 3 | ||||
| -rw-r--r-- | tooling/libmkfs/mkfs.h | 9 | ||||
| -rwxr-xr-x[-rw-r--r--] | tooling/mk_htman.py (renamed from tooling/manual.py) | 0 |
3 files changed, 6 insertions, 6 deletions
diff --git a/dev/kernel/GfxKit/FB.h b/dev/kernel/GfxKit/FB.h index 14f0393c..d7523064 100644 --- a/dev/kernel/GfxKit/FB.h +++ b/dev/kernel/GfxKit/FB.h @@ -6,8 +6,7 @@ #pragma once -#include <modules/CoreGfx/CoreGfx.h> -#include <modules/CoreGfx/TextGfx.h> +#include <KernelKit/DeviceMgr.h> namespace Kernel { class FBDeviceInterface; diff --git a/tooling/libmkfs/mkfs.h b/tooling/libmkfs/mkfs.h index d87060da..1765e1d4 100644 --- a/tooling/libmkfs/mkfs.h +++ b/tooling/libmkfs/mkfs.h @@ -7,6 +7,7 @@ #pragma once #include <tooling/rang.h> +#include <sstream> #include <iostream> #include <string> @@ -19,11 +20,11 @@ namespace mkfs { namespace detail { /// @internal /// @brief GB‐to‐byte conversion (use multiplication, not XOR). - static constexpr size_t gib_cast(uint32_t gb) { + inline constexpr size_t gib_cast(uint32_t gb) { return static_cast<size_t>(gb) * 1024ULL * 1024ULL * 1024ULL; } - static bool parse_decimal(const std::string& opt, unsigned long long& out) { + inline bool parse_decimal(const std::string& opt, unsigned long long& out) { if (opt.empty()) return false; char* endptr = nullptr; unsigned long long val = std::strtoull(opt.c_str(), &endptr, 10); @@ -32,7 +33,7 @@ namespace detail { return true; } - static bool parse_signed(const std::string& opt, long& out, int base = 10) { + inline bool parse_signed(const std::string& opt, long& out, int base = 10) { if (opt.empty()) return false; char* endptr = nullptr; long val = std::strtol(opt.c_str(), &endptr, base); @@ -41,7 +42,7 @@ namespace detail { return true; } - static std::string build_args(int argc, char** argv) { + inline std::string build_args(int argc, char** argv) { std::string combined; for (int i = 1; i < argc; ++i) { combined += argv[i]; diff --git a/tooling/manual.py b/tooling/mk_htman.py index 8298559b..8298559b 100644..100755 --- a/tooling/manual.py +++ b/tooling/mk_htman.py |
