mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +00:00
Everywhere: Hook up remaining debug macros to Debug.h.
This commit is contained in:
parent
da69de1f1b
commit
eea72b9b5c
63 changed files with 458 additions and 287 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
#include <Kernel/Storage/Partition/DiskPartition.h>
|
||||
|
||||
|
@ -60,7 +61,7 @@ KResultOr<size_t> DiskPartition::read(FileDescription& fd, size_t offset, UserOr
|
|||
{
|
||||
unsigned adjust = m_metadata.start_block() * block_size();
|
||||
|
||||
#ifdef OFFD_DEBUG
|
||||
#if OFFD_DEBUG
|
||||
klog() << "DiskPartition::read offset=" << fd.offset() << " adjust=" << adjust << " len=" << len;
|
||||
#endif
|
||||
|
||||
|
@ -71,7 +72,7 @@ bool DiskPartition::can_read(const FileDescription& fd, size_t offset) const
|
|||
{
|
||||
unsigned adjust = m_metadata.start_block() * block_size();
|
||||
|
||||
#ifdef OFFD_DEBUG
|
||||
#if OFFD_DEBUG
|
||||
klog() << "DiskPartition::can_read offset=" << offset << " adjust=" << adjust;
|
||||
#endif
|
||||
|
||||
|
@ -82,7 +83,7 @@ KResultOr<size_t> DiskPartition::write(FileDescription& fd, size_t offset, const
|
|||
{
|
||||
unsigned adjust = m_metadata.start_block() * block_size();
|
||||
|
||||
#ifdef OFFD_DEBUG
|
||||
#if OFFD_DEBUG
|
||||
klog() << "DiskPartition::write offset=" << offset << " adjust=" << adjust << " len=" << len;
|
||||
#endif
|
||||
|
||||
|
@ -93,7 +94,7 @@ bool DiskPartition::can_write(const FileDescription& fd, size_t offset) const
|
|||
{
|
||||
unsigned adjust = m_metadata.start_block() * block_size();
|
||||
|
||||
#ifdef OFFD_DEBUG
|
||||
#if OFFD_DEBUG
|
||||
klog() << "DiskPartition::can_write offset=" << offset << " adjust=" << adjust;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
#include <AK/ByteBuffer.h>
|
||||
#include <Kernel/Storage/Partition/EBRPartitionTable.h>
|
||||
|
||||
#ifndef EBR_DEBUG
|
||||
# define EBR_DEBUG
|
||||
#endif
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
Result<NonnullOwnPtr<EBRPartitionTable>, PartitionTable::Error> EBRPartitionTable::try_to_initialize(const StorageDevice& device)
|
||||
|
|
|
@ -26,12 +26,9 @@
|
|||
|
||||
#include <AK/AllOf.h>
|
||||
#include <AK/Array.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <Kernel/Storage/Partition/GUIDPartitionTable.h>
|
||||
|
||||
#ifndef GPT_DEBUG
|
||||
# define GPT_DEBUG
|
||||
#endif
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
#define GPT_SIGNATURE2 0x54524150
|
||||
|
@ -103,7 +100,7 @@ bool GUIDPartitionTable::initialize()
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef GPT_DEBUG
|
||||
#if GPT_DEBUG
|
||||
klog() << "GUIDPartitionTable: signature - 0x" << String::format("%x", header().sig[1]) << String::format("%x", header().sig[0]);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,12 +25,9 @@
|
|||
*/
|
||||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <Kernel/Storage/Partition/MBRPartitionTable.h>
|
||||
|
||||
#ifndef MBR_DEBUG
|
||||
# define MBR_DEBUG
|
||||
#endif
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
#define MBR_SIGNATURE 0xaa55
|
||||
|
@ -123,7 +120,7 @@ const MBRPartitionTable::Header& MBRPartitionTable::header() const
|
|||
bool MBRPartitionTable::initialize()
|
||||
{
|
||||
auto& header = this->header();
|
||||
#ifdef MBR_DEBUG
|
||||
#if MBR_DEBUG
|
||||
|
||||
klog() << "Master Boot Record: mbr_signature=0x" << String::format("%x", header.mbr_signature);
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/Memory.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
|
@ -63,7 +64,7 @@ KResultOr<size_t> StorageDevice::read(FileDescription&, size_t offset, UserOrKer
|
|||
remaining = 0;
|
||||
}
|
||||
|
||||
#ifdef STORAGE_DEVICE_DEBUG
|
||||
#if STORAGE_DEVICE_DEBUG
|
||||
klog() << "StorageDevice::read() index=" << index << " whole_blocks=" << whole_blocks << " remaining=" << remaining;
|
||||
#endif
|
||||
|
||||
|
@ -130,7 +131,7 @@ KResultOr<size_t> StorageDevice::write(FileDescription&, size_t offset, const Us
|
|||
remaining = 0;
|
||||
}
|
||||
|
||||
#ifdef STORAGE_DEVICE_DEBUG
|
||||
#if STORAGE_DEVICE_DEBUG
|
||||
klog() << "StorageDevice::write() index=" << index << " whole_blocks=" << whole_blocks << " remaining=" << remaining;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue