summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2021-01-10 14:39:20 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-11 11:55:47 +0100
commit872f2a3b90852c5211e68e7c73f871585576a3f8 (patch)
tree826c99d7635df1058dce1c46cfcf4854ffddb6cb
parent11d651d4478dedb1c565b1e9a613c70df431ba44 (diff)
downloadserenity-872f2a3b90852c5211e68e7c73f871585576a3f8.zip
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:
-rw-r--r--Kernel/Arch/i386/CPU.h2
-rw-r--r--Kernel/Devices/BlockDevice.cpp12
-rw-r--r--Kernel/Devices/Device.cpp2
-rw-r--r--Kernel/Devices/I8042Controller.cpp3
-rw-r--r--Kernel/Devices/KeyboardDevice.cpp2
-rw-r--r--Kernel/Devices/MBVGADevice.cpp4
-rw-r--r--Kernel/Devices/PS2MouseDevice.cpp4
-rw-r--r--Kernel/FileSystem/BlockBasedFileSystem.cpp2
8 files changed, 16 insertions, 15 deletions
diff --git a/Kernel/Arch/i386/CPU.h b/Kernel/Arch/i386/CPU.h
index d42ff1707a..5049ad20cc 100644
--- a/Kernel/Arch/i386/CPU.h
+++ b/Kernel/Arch/i386/CPU.h
@@ -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:
diff --git a/Kernel/Devices/BlockDevice.cpp b/Kernel/Devices/BlockDevice.cpp
index 9e24f2dba8..f2863ecb55 100644
--- a/Kernel/Devices/BlockDevice.cpp
+++ b/Kernel/Devices/BlockDevice.cpp
@@ -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();
diff --git a/Kernel/Devices/Device.cpp b/Kernel/Devices/Device.cpp
index 5652de33b8..c768eb7308 100644
--- a/Kernel/Devices/Device.cpp
+++ b/Kernel/Devices/Device.cpp
@@ -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);
diff --git a/Kernel/Devices/I8042Controller.cpp b/Kernel/Devices/I8042Controller.cpp
index 790f51882f..8798ea1c49 100644
--- a/Kernel/Devices/I8042Controller.cpp
+++ b/Kernel/Devices/I8042Controller.cpp
@@ -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);
diff --git a/Kernel/Devices/KeyboardDevice.cpp b/Kernel/Devices/KeyboardDevice.cpp
index 46cc89bda0..d6974aaa27 100644
--- a/Kernel/Devices/KeyboardDevice.cpp
+++ b/Kernel/Devices/KeyboardDevice.cpp
@@ -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);
}
}
diff --git a/Kernel/Devices/MBVGADevice.cpp b/Kernel/Devices/MBVGADevice.cpp
index a62915156c..4ddb3c8610 100644
--- a/Kernel/Devices/MBVGADevice.cpp
+++ b/Kernel/Devices/MBVGADevice.cpp
@@ -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;
}
diff --git a/Kernel/Devices/PS2MouseDevice.cpp b/Kernel/Devices/PS2MouseDevice.cpp
index 8b2d0d7fd7..159cb9b35b 100644
--- a/Kernel/Devices/PS2MouseDevice.cpp
+++ b/Kernel/Devices/PS2MouseDevice.cpp
@@ -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;
}
diff --git a/Kernel/FileSystem/BlockBasedFileSystem.cpp b/Kernel/FileSystem/BlockBasedFileSystem.cpp
index 103b28d5fc..fbdf11b75d 100644
--- a/Kernel/FileSystem/BlockBasedFileSystem.cpp
+++ b/Kernel/FileSystem/BlockBasedFileSystem.cpp
@@ -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()