1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:57:35 +00:00

Kernel: Convert klog() => AK::Format in Storage

This commit is contained in:
Andreas Kling 2021-03-12 14:02:17 +01:00
parent feda905c3f
commit 8a7fe86ee0
4 changed files with 7 additions and 17 deletions

View file

@ -100,12 +100,10 @@ bool GUIDPartitionTable::initialize()
return false;
}
#if GPT_DEBUG
klog() << "GUIDPartitionTable: signature - 0x" << String::format("%x", header().sig[1]) << String::format("%x", header().sig[0]);
#endif
dbgln_if(GPT_DEBUG, "GUIDPartitionTable: signature - {:#08x} {:#08x}", header().sig[1], header().sig[0]);
if (header().sig[0] != GPT_SIGNATURE && header().sig[1] != GPT_SIGNATURE2) {
klog() << "GUIDPartitionTable: bad signature 0x" << String::format("%x", header().sig[1]) << String::format("%x", header().sig[0]);
dbgln("GUIDPartitionTable: bad signature {:#08x} {:#08x}", header().sig[1], header().sig[0]);
return false;
}

View file

@ -120,13 +120,9 @@ const MBRPartitionTable::Header& MBRPartitionTable::header() const
bool MBRPartitionTable::initialize()
{
auto& header = this->header();
#if MBR_DEBUG
klog() << "Master Boot Record: mbr_signature=0x" << String::format("%x", header.mbr_signature);
#endif
dbgln_if(MBR_DEBUG, "Master Boot Record: mbr_signature={:#08x}", header.mbr_signature);
if (header.mbr_signature != MBR_SIGNATURE) {
klog() << "Master Boot Record: invalid signature";
dbgln("Master Boot Record: invalid signature");
return false;
}
return true;