1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +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:
This commit is contained in:
asynts 2021-01-10 14:39:20 +01:00 committed by Andreas Kling
parent 11d651d447
commit 872f2a3b90
8 changed files with 16 additions and 15 deletions

View file

@ -591,7 +591,7 @@ public:
SplitQword end;
read_tsc(end.lsw, end.msw);
uint64_t diff = end.qw - m_start.qw;
dbg() << "Stopwatch(" << m_name << "): " << diff << " ticks";
dbgln("Stopwatch({}): {} ticks", m_name, diff);
}
private:

View file

@ -55,13 +55,13 @@ bool BlockDevice::read_block(unsigned index, UserOrKernelBuffer& buffer)
case AsyncDeviceRequest::Success:
return true;
case AsyncDeviceRequest::Failure:
dbg() << "BlockDevice::read_block(" << index << ") IO error";
dbgln("BlockDevice::read_block({}) IO error", index);
break;
case AsyncDeviceRequest::MemoryFault:
dbg() << "BlockDevice::read_block(" << index << ") EFAULT";
dbgln("BlockDevice::read_block({}) EFAULT", index);
break;
case AsyncDeviceRequest::Cancelled:
dbg() << "BlockDevice::read_block(" << index << ") cancelled";
dbgln("BlockDevice::read_block({}) cancelled", index);
break;
default:
ASSERT_NOT_REACHED();
@ -76,13 +76,13 @@ bool BlockDevice::write_block(unsigned index, const UserOrKernelBuffer& buffer)
case AsyncDeviceRequest::Success:
return true;
case AsyncDeviceRequest::Failure:
dbg() << "BlockDevice::write_block(" << index << ") IO error";
dbgln("BlockDevice::write_block({}) IO error", index);
break;
case AsyncDeviceRequest::MemoryFault:
dbg() << "BlockDevice::write_block(" << index << ") EFAULT";
dbgln("BlockDevice::write_block({}) EFAULT", index);
break;
case AsyncDeviceRequest::Cancelled:
dbg() << "BlockDevice::write_block(" << index << ") cancelled";
dbgln("BlockDevice::write_block({}) cancelled", index);
break;
default:
ASSERT_NOT_REACHED();

View file

@ -59,7 +59,7 @@ Device::Device(unsigned major, unsigned minor)
u32 device_id = encoded_device(major, minor);
auto it = all_devices().find(device_id);
if (it != all_devices().end()) {
dbg() << "Already registered " << major << "," << minor << ": " << it->value->class_name();
dbgln("Already registered {},{}: {}", major, minor, it->value->class_name());
}
ASSERT(!all_devices().contains(device_id));
all_devices().set(device_id, this);

View file

@ -67,7 +67,8 @@ I8042Controller::I8042Controller()
do_wait_then_write(I8042_BUFFER, configuration);
m_is_dual_channel = (configuration & (1 << 5)) != 0;
dbg() << "I8042: " << (m_is_dual_channel ? "Dual" : "Single") << " channel controller";
dbgln("I8042: {} channel controller",
m_is_dual_channel ? "Dual" : "Single");
// Perform controller self-test
do_wait_then_write(I8042_STATUS, 0xaa);

View file

@ -408,7 +408,7 @@ void KeyboardDevice::set_maps(const Keyboard::CharacterMapData& character_map_da
{
m_character_map.set_character_map_data(character_map_data);
m_character_map.set_character_map_name(character_map_name);
dbg() << "New Character map \"" << character_map_name << "\" passing to client.";
dbgln("New Character map '{}' passing to client.", character_map_name);
}
}

View file

@ -47,7 +47,7 @@ MBVGADevice::MBVGADevice(PhysicalAddress addr, size_t pitch, size_t width, size_
, m_framebuffer_width(width)
, m_framebuffer_height(height)
{
dbg() << "MBVGADevice address=" << addr << ", pitch=" << pitch << ", width=" << width << ", height=" << height;
dbgln("MBVGADevice address={}, pitch={}, width={}, height={}", addr, pitch, width, height);
s_the = this;
}
@ -71,7 +71,7 @@ KResultOr<Region*> MBVGADevice::mmap(Process& process, FileDescription&, Virtual
shared);
if (!region)
return KResult(-ENOMEM);
dbg() << "MBVGADevice: mmap with size " << region->size() << " at " << region->vaddr();
dbgln("MBVGADevice: mmap with size {} at {}", region->size(), region->vaddr());
return region;
}

View file

@ -203,7 +203,7 @@ u8 PS2MouseDevice::send_command(u8 command)
{
u8 response = m_controller.send_command(I8042Controller::Device::Mouse, command);
if (response != I8042_ACK)
dbg() << "PS2MouseDevice: Command " << (int)command << " got " << (int)response << " but expected ack: " << (int)I8042_ACK;
dbgln("PS2MouseDevice: Command {} got {} but expected ack: {}", command, response, I8042_ACK);
return response;
}
@ -211,7 +211,7 @@ u8 PS2MouseDevice::send_command(u8 command, u8 data)
{
u8 response = m_controller.send_command(I8042Controller::Device::Mouse, command, data);
if (response != I8042_ACK)
dbg() << "PS2MouseDevice: Command " << (int)command << " got " << (int)response << " but expected ack: " << (int)I8042_ACK;
dbgln("PS2MouseDevice: Command {} got {} but expected ack: {}", command, response, I8042_ACK);
return response;
}

View file

@ -315,7 +315,7 @@ void BlockBasedFS::flush_writes_impl()
++count;
});
cache().mark_all_clean();
dbg() << class_name() << ": Flushed " << count << " blocks to disk";
dbgln("{}: Flushed {} blocks to disk", class_name(), count);
}
void BlockBasedFS::flush_writes()