Kernel: Fix ACPI name formatting functions

This commit is contained in:
Bananymous 2024-09-14 19:39:13 +03:00
parent 57e76a65a4
commit b41738b47b
1 changed files with 21 additions and 18 deletions

View File

@ -215,8 +215,10 @@ namespace BAN
} }
}; };
namespace Formatter
{
template<typename F> template<typename F>
void Formatter::print_argument(F putc, const Kernel::ACPI::AML::NameSeg& name_seg, const ValueFormat&) void print_argument(F putc, const Kernel::ACPI::AML::NameSeg& name_seg, const ValueFormat&)
{ {
size_t len = 4; size_t len = 4;
while (len > 0 && name_seg.chars[len - 1] == '_') while (len > 0 && name_seg.chars[len - 1] == '_')
@ -226,7 +228,7 @@ namespace BAN
} }
template<typename F> template<typename F>
void Formatter::print_argument(F putc, const Kernel::ACPI::AML::NameString& name_string, const ValueFormat&) void print_argument(F putc, const Kernel::ACPI::AML::NameString& name_string, const ValueFormat&)
{ {
print_argument(putc, name_string.prefix, {}); print_argument(putc, name_string.prefix, {});
if (!name_string.path.empty()) if (!name_string.path.empty())
@ -237,5 +239,6 @@ namespace BAN
print_argument(putc, name_string.path[i], {}); print_argument(putc, name_string.path[i], {});
} }
} }
}
} }