diff options
author | Andreas Kling <kling@serenityos.org> | 2021-03-12 12:12:00 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-12 12:12:00 +0100 |
commit | 8b0ebe3e308ce3024ff2f1256a23b3bb3d59412d (patch) | |
tree | 01524beec890777ce0f86f673e53603cf34a75da /Kernel | |
parent | f9aace29ec39b646e7a6882e70eb34e375bb6766 (diff) | |
download | serenity-8b0ebe3e308ce3024ff2f1256a23b3bb3d59412d.zip |
Kernel: Convert klog() => AK::Format in DiskPartition
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Storage/Partition/DiskPartition.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/Kernel/Storage/Partition/DiskPartition.cpp b/Kernel/Storage/Partition/DiskPartition.cpp index 6499fac5ed..a7d49f9fdb 100644 --- a/Kernel/Storage/Partition/DiskPartition.cpp +++ b/Kernel/Storage/Partition/DiskPartition.cpp @@ -60,44 +60,28 @@ void DiskPartition::start_request(AsyncBlockDeviceRequest& request) KResultOr<size_t> DiskPartition::read(FileDescription& fd, size_t offset, UserOrKernelBuffer& outbuf, size_t len) { unsigned adjust = m_metadata.start_block() * block_size(); - -#if OFFD_DEBUG - klog() << "DiskPartition::read offset=" << fd.offset() << " adjust=" << adjust << " len=" << len; -#endif - + dbgln_if(OFFD_DEBUG, "DiskPartition::read offset={}, adjust={}, len={}", fd.offset(), adjust, len); return m_device->read(fd, offset + adjust, outbuf, len); } bool DiskPartition::can_read(const FileDescription& fd, size_t offset) const { unsigned adjust = m_metadata.start_block() * block_size(); - -#if OFFD_DEBUG - klog() << "DiskPartition::can_read offset=" << offset << " adjust=" << adjust; -#endif - + dbgln_if(OFFD_DEBUG, "DiskPartition::can_read offset={}, adjust={}", offset, adjust); return m_device->can_read(fd, offset + adjust); } KResultOr<size_t> DiskPartition::write(FileDescription& fd, size_t offset, const UserOrKernelBuffer& inbuf, size_t len) { unsigned adjust = m_metadata.start_block() * block_size(); - -#if OFFD_DEBUG - klog() << "DiskPartition::write offset=" << offset << " adjust=" << adjust << " len=" << len; -#endif - + dbgln_if(OFFD_DEBUG, "DiskPartition::write offset={}, adjust={}, len={}", offset, adjust, len); return m_device->write(fd, offset + adjust, inbuf, len); } bool DiskPartition::can_write(const FileDescription& fd, size_t offset) const { unsigned adjust = m_metadata.start_block() * block_size(); - -#if OFFD_DEBUG - klog() << "DiskPartition::can_write offset=" << offset << " adjust=" << adjust; -#endif - + dbgln_if(OFFD_DEBUG, "DiskPartition::can_write offset={}, adjust={}", offset, adjust); return m_device->can_write(fd, offset + adjust); } |