Fix format specifiers
This commit is contained in:
parent
86e53c3004
commit
97aef95daa
@ -9,13 +9,13 @@ extern "C" void common_handler(SavedContext* context)
|
|||||||
if (context->number < 0x20) { Debug::DebugStatus::the()->ThrowException(context->number); }
|
if (context->number < 0x20) { Debug::DebugStatus::the()->ThrowException(context->number); }
|
||||||
if (context->number == 13)
|
if (context->number == 13)
|
||||||
{
|
{
|
||||||
printf("General protection fault at %zx, %d, %d, %zx, %d, %zx\n", context->rip, context->cs, context->ss,
|
printf("General protection fault at %zx, %ld, %ld, %zx, %ld, %zx\n", context->rip, context->cs, context->ss,
|
||||||
context->rsp, context->error_code, context->cr2);
|
context->rsp, context->error_code, context->cr2);
|
||||||
while (1) halt();
|
while (1) halt();
|
||||||
}
|
}
|
||||||
if (context->number == 14)
|
if (context->number == 14)
|
||||||
{
|
{
|
||||||
printf("Page fault at 0x%zx\n");
|
printf("Page fault at 0x%zx\n", context->rip);
|
||||||
hang();
|
hang();
|
||||||
}
|
}
|
||||||
if (context->number >= 0x20 && context->number < 0x30) { IRQ::interrupt_handler(context); }
|
if (context->number >= 0x20 && context->number < 0x30) { IRQ::interrupt_handler(context); }
|
||||||
|
@ -16,10 +16,10 @@ void IRQ::interrupt_handler(SavedContext* context)
|
|||||||
case 1: {
|
case 1: {
|
||||||
volatile unsigned char scancode = IO::inb(0x60);
|
volatile unsigned char scancode = IO::inb(0x60);
|
||||||
Debug::DebugStatus::the()->DebugKey(scancode);
|
Debug::DebugStatus::the()->DebugKey(scancode);
|
||||||
printf("Keyboard key pressed, seconds since boot: %d\n", PIT::ms_since_boot / 1000);
|
printf("Keyboard key pressed, seconds since boot: %ld\n", PIT::ms_since_boot / 1000);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: printf("Unhandled IRQ: %d", context->irq_number); break;
|
default: printf("Unhandled IRQ: %ld", context->irq_number); break;
|
||||||
}
|
}
|
||||||
PIC::send_eoi(context->irq_number);
|
PIC::send_eoi(context->irq_number);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user