Compare commits

...

2 Commits

Author SHA1 Message Date
98134957e7 Print APIC table signatures found 2023-06-08 13:21:43 -04:00
22463e729b writef: add %c format specifier support 2023-06-08 13:21:24 -04:00
2 changed files with 15 additions and 1 deletions

View File

@ -77,6 +77,12 @@ struct Acpi
{
parse_apic_table(address);
}
Klog.writefln("Found ACPI table %08x (%c%c%c%c)",
signature,
signature & 0xFFu,
(signature >> 8u) & 0xFFu,
(signature >> 16u) & 0xFFu,
(signature >> 24u) & 0xFFu);
}
}

View File

@ -26,7 +26,15 @@ size_t writef(string s, va_list args, ch_out_fn ch_out)
{
if (escape)
{
if (c == 'x')
if (c == 'c')
{
ulong ch;
va_arg(args, ch);
ch_out(cast(ubyte)ch);
length_written++;
escape = false;
}
else if (c == 'x')
{
ulong v;
va_arg(args, v);