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

Everywhere: Replace a bundle of dbg with dbgln.

These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.Everything:

The modifications in this commit were automatically made using the
following command:

    find . -name '*.cpp' -exec sed -i -E 's/dbg\(\) << ("[^"{]*");/dbgln\(\1\);/' {} \;
This commit is contained in:
asynts 2021-01-09 18:51:44 +01:00 committed by Andreas Kling
parent 40b8e21115
commit 938e5c7719
95 changed files with 331 additions and 331 deletions

View file

@ -76,7 +76,7 @@ I8042Controller::I8042Controller()
do_wait_then_write(I8042_STATUS, 0x60);
do_wait_then_write(I8042_BUFFER, configuration);
} else {
dbg() << "I8042: Controller self test failed";
dbgln("I8042: Controller self test failed");
}
// Test ports and enable them if available
@ -88,7 +88,7 @@ I8042Controller::I8042Controller()
configuration |= 1;
configuration &= ~(1 << 4);
} else {
dbg() << "I8042: Keyboard port not available";
dbgln("I8042: Keyboard port not available");
}
if (m_is_dual_channel) {
@ -99,7 +99,7 @@ I8042Controller::I8042Controller()
configuration |= 2;
configuration &= ~(1 << 5);
} else {
dbg() << "I8042: Mouse port not available";
dbgln("I8042: Mouse port not available");
}
}
@ -116,7 +116,7 @@ I8042Controller::I8042Controller()
if (KeyboardDevice::the().initialize()) {
m_devices[0].device = &KeyboardDevice::the();
} else {
dbg() << "I8042: Keyboard device failed to initialize, disable";
dbgln("I8042: Keyboard device failed to initialize, disable");
m_devices[0].available = false;
configuration &= ~1;
configuration |= 1 << 4;
@ -129,7 +129,7 @@ I8042Controller::I8042Controller()
if (PS2MouseDevice::the().initialize()) {
m_devices[1].device = &PS2MouseDevice::the();
} else {
dbg() << "I8042: Mouse device failed to initialize, disable";
dbgln("I8042: Mouse device failed to initialize, disable");
m_devices[1].available = false;
configuration |= 1 << 5;
ScopedSpinLock lock(m_lock);
@ -223,7 +223,7 @@ u8 I8042Controller::do_write_to_device(Device device, u8 data)
response = do_wait_then_read(I8042_BUFFER);
} while (response == I8042_RESEND && ++attempts < 3);
if (attempts >= 3)
dbg() << "Failed to write byte to device, gave up";
dbgln("Failed to write byte to device, gave up");
return response;
}

View file

@ -356,7 +356,7 @@ KeyboardDevice::~KeyboardDevice()
bool KeyboardDevice::initialize()
{
if (!m_controller.reset_device(I8042Controller::Device::Keyboard)) {
dbg() << "KeyboardDevice: I8042 controller failed to reset device";
dbgln("KeyboardDevice: I8042 controller failed to reset device");
return false;
}
return true;

View file

@ -118,7 +118,7 @@ void PS2MouseDevice::irq_handle_byte_read(u8 byte)
switch (m_data_state) {
case 0:
if (!(byte & 0x08)) {
dbg() << "PS2Mouse: Stream out of sync.";
dbgln("PS2Mouse: Stream out of sync.");
break;
}
++m_data_state;
@ -223,7 +223,7 @@ void PS2MouseDevice::set_sample_rate(u8 rate)
bool PS2MouseDevice::initialize()
{
if (!m_controller.reset_device(I8042Controller::Device::Mouse)) {
dbg() << "PS2MouseDevice: I8042 controller failed to reset device";
dbgln("PS2MouseDevice: I8042 controller failed to reset device");
return false;
}
@ -284,7 +284,7 @@ KResultOr<size_t> PS2MouseDevice::read(FileDescription&, size_t, UserOrKernelBuf
#ifdef PS2MOUSE_DEBUG
dbg() << "PS2 Mouse Read: Buttons " << String::format("%x", packet.buttons);
dbg() << "PS2 Mouse: X " << packet.x << ", Y " << packet.y << ", Z " << packet.z << " Relative " << packet.buttons;
dbg() << "PS2 Mouse Read: Filter packets";
dbgln("PS2 Mouse Read: Filter packets");
#endif
size_t bytes_read_from_packet = min(remaining_space_in_buffer, sizeof(MousePacket));
if (!buffer.write(&packet, nread, bytes_read_from_packet))