diff --git a/modules.yaml b/modules.yaml index 32b21bf..031f148 100644 --- a/modules.yaml +++ b/modules.yaml @@ -60,7 +60,6 @@ modules: - src/boot/error.cpp - src/boot/hardware.cpp - src/boot/memory.cpp - - src/boot/utility.cpp nulldrv: kind: exe diff --git a/src/boot/console.cpp b/src/boot/console.cpp index ab4d38b..22a7ffc 100644 --- a/src/boot/console.cpp +++ b/src/boot/console.cpp @@ -7,7 +7,6 @@ #include "console.h" #include "error.h" -#include "utility.h" #ifndef GIT_VERSION_WIDE #define GIT_VERSION_WIDE L"no version" @@ -39,6 +38,16 @@ status_line *status_line::s_current = nullptr; static const wchar_t digits[] = {u'0', u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'9', u'a', u'b', u'c', u'd', u'e', u'f'}; + +static size_t +wstrlen(const wchar_t *s) +{ + size_t count = 0; + while (s && *s++) count++; + return count; +} + + console::console(uefi::boot_services *bs, uefi::protos::simple_text_output *out) : m_rows(0), m_cols(0), diff --git a/src/boot/memory.cpp b/src/boot/memory.cpp index 3666c69..d5af3f6 100644 --- a/src/boot/memory.cpp +++ b/src/boot/memory.cpp @@ -4,7 +4,6 @@ #include "error.h" #include "console.h" #include "memory.h" -#include "utility.h" namespace boot { namespace memory { diff --git a/src/boot/utility.cpp b/src/boot/utility.cpp deleted file mode 100644 index 75273e5..0000000 --- a/src/boot/utility.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "utility.h" - -size_t -wstrlen(const wchar_t *s) -{ - size_t count = 0; - while (s && *s++) count++; - return count; -} - diff --git a/src/boot/utility.h b/src/boot/utility.h deleted file mode 100644 index 8485782..0000000 --- a/src/boot/utility.h +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include - -#include "console.h" - -#define UNUSED __attribute__((unused)) - -size_t wstrlen(const wchar_t *s); - -#ifdef BOOTLOADER_DEBUG -#define con_debug(msg, ...) console::print(L"DEBUG: " msg L"\r\n", __VA_ARGS__) -#else -#define con_debug(msg, ...) -#endif