Replace kinfoln with kwarnln where appropriate

This commit is contained in:
apio 2022-09-08 16:22:46 +02:00
parent 3da3fd2c11
commit 76a3ceab32

View File

@ -17,34 +17,34 @@ static void try_acpi_reboot()
ACPI::SDTHeader* rootSDT = ACPI::GetRSDTOrXSDT();
if (!rootSDT)
{
kinfoln("The pointer to the RSDT/XSDT is null");
kwarnln("The pointer to the RSDT/XSDT is null");
return;
}
if (!ACPI::ValidateSDTHeader(rootSDT))
{
kinfoln("The RSDT/XSDT has an invalid header");
kwarnln("The RSDT/XSDT has an invalid header");
return;
}
if (strncmp(rootSDT->Signature, "RSDT", 4) != 0 && strncmp(rootSDT->Signature, "XSDT", 4) != 0)
{
kinfoln("The RSDT/XSDT's signature is not RSDT or XSDT");
kwarnln("The RSDT/XSDT's signature is not RSDT or XSDT");
return;
}
kinfoln("Searching for the FADT");
ACPI::FADT* fadt = (ACPI::FADT*)ACPI::FindTable(rootSDT, "FACP");
if (!fadt)
{
kinfoln("Unable to find the FADT");
kwarnln("Unable to find the FADT");
return;
}
if (fadt->header.Revision < 2)
{
kinfoln("ACPI revision is too low (%d), ACPI Reset is only implemented in ACPI 2.0+", fadt->header.Revision);
kwarnln("ACPI revision is too low (%d), ACPI Reset is only implemented in ACPI 2.0+", fadt->header.Revision);
return;
}
if (!(fadt->Flags & 1 << 10))
{
kinfoln("This system does not support ACPI Reset");
kwarnln("This system does not support ACPI Reset");
return;
}
switch (fadt->ResetReg.AddressSpace)
@ -59,9 +59,9 @@ static void try_acpi_reboot()
fadt->ResetReg.Address);
IO::outb(fadt->ResetReg.Address, fadt->ResetValue);
break;
default: kinfoln("This method of rebooting via ACPI is not yet implemented"); return;
default: kwarnln("This method of rebooting via ACPI is not yet implemented"); return;
}
kinfoln("Tried to reboot, but apparently did nothing");
kerrorln("Tried to reboot, but apparently did nothing");
}
static void try_kbd_reboot()