1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

Kernel: Use klog() instead of kprintf()

Also, duplicate data in dbg() and klog() calls were removed.
In addition, leakage of virtual address to kernel log is prevented.
This is done by replacing kprintf() calls to dbg() calls with the
leaked data instead.
Also, other kprintf() calls were replaced with klog().
This commit is contained in:
Liav A 2020-03-01 21:45:39 +02:00 committed by Andreas Kling
parent 19aa53e1f9
commit 0fc60e41dd
53 changed files with 397 additions and 573 deletions

View file

@ -103,7 +103,7 @@ void SB16::initialize()
auto data = dsp_read();
if (data != 0xaa) {
kprintf("SB16: sb not ready");
klog() << "SB16: sb not ready";
return;
}
@ -112,9 +112,9 @@ void SB16::initialize()
m_major_version = dsp_read();
auto vmin = dsp_read();
kprintf("SB16: found version %d.%d\n", m_major_version, vmin);
klog() << "SB16: found version " << m_major_version << "." << vmin;
set_irq_register(SB16_DEFAULT_IRQ);
kprintf("SB16: IRQ %d\n", get_irq_line());
klog() << "SB16: IRQ " << get_irq_line();
}
void SB16::set_irq_register(u8 irq_number)
@ -235,7 +235,7 @@ ssize_t SB16::write(FileDescription&, const u8* data, ssize_t length)
}
#ifdef SB16_DEBUG
kprintf("SB16: Writing buffer of %d bytes\n", length);
klog() << "SB16: Writing buffer of " << length << " bytes";
#endif
ASSERT(length <= PAGE_SIZE);
const int BLOCK_SIZE = 32 * 1024;