diff --git a/sys/teton/framebuffer/psf.cpp b/sys/teton/framebuffer/psf.cpp index 43714c6..1e8aaf2 100644 --- a/sys/teton/framebuffer/psf.cpp +++ b/sys/teton/framebuffer/psf.cpp @@ -3,6 +3,8 @@ #include #include +#define PSF_DEBUG 0 + namespace { const uint32_t kMagic = 0x864AB572; @@ -16,6 +18,7 @@ Psf::Psf(glcr::StringView path) } void Psf::DumpHeader() { +#if PSF_DEBUG dbgln("Magic: {x}", header_->magic); dbgln("Version: {x}", header_->version); dbgln("Header Sz: {x}", header_->headersize); @@ -24,6 +27,7 @@ void Psf::DumpHeader() { dbgln("Glyph Size: {x}", header_->bytesperglyph); dbgln("Height: {x}", header_->height); dbgln("Width: {x}", header_->width); +#endif } void Psf::EnsureValid() { diff --git a/sys/victoriafalls/fs/ext2/ext2_block_reader.cpp b/sys/victoriafalls/fs/ext2/ext2_block_reader.cpp index 3262f48..d8a6006 100644 --- a/sys/victoriafalls/fs/ext2/ext2_block_reader.cpp +++ b/sys/victoriafalls/fs/ext2/ext2_block_reader.cpp @@ -96,9 +96,7 @@ glcr::ErrorOr Ext2BlockReader::ReadBlocks( } req.add_lba(curr_start); req.add_sector_cnt(curr_run_len * SectorsPerBlock()); - dbgln("Read {x}, {x}", curr_start, curr_run_len * SectorsPerBlock()); } - dbgln("Read many: {x}", req.lba().size()); ReadResponse resp; auto status = denali_.ReadMany(req, resp); if (!status.ok()) { diff --git a/sys/victoriafalls/fs/ext2/ext2_driver.cpp b/sys/victoriafalls/fs/ext2/ext2_driver.cpp index 155c6c0..9d90672 100644 --- a/sys/victoriafalls/fs/ext2/ext2_driver.cpp +++ b/sys/victoriafalls/fs/ext2/ext2_driver.cpp @@ -3,6 +3,8 @@ #include #include +#define EXT2_DEBUG 0 + glcr::ErrorOr Ext2Driver::Init( const yellowstone::DenaliInfo& denali_info) { ASSIGN_OR_RETURN(glcr::SharedPtr reader, @@ -23,6 +25,8 @@ glcr::ErrorCode Ext2Driver::ProbePartition() { dbgln("Invalid EXT2 magic code: {x}"); return glcr::INVALID_ARGUMENT; } + +#if EXT2_DEBUG dbgln("Block size: 0x{x}", 1024 << superblock->log_block_size); dbgln("Blocks: 0x{x} (0x{x} per group)", superblock->blocks_count, @@ -36,6 +40,7 @@ glcr::ErrorCode Ext2Driver::ProbePartition() { dbgln("State: {x}", superblock->state); dbgln("Created by: {x}", superblock->creator_os); +#endif return glcr::OK; } @@ -63,7 +68,6 @@ glcr::ErrorOr> Ext2Driver::ReadDirectory( glcr::Vector directory; for (uint64_t i = 0; i < real_block_cnt; i++) { - dbgln("Getting block {x}", inode->block[i]); ASSIGN_OR_RETURN(mmth::OwnedMemoryRegion block, ext2_reader_->ReadBlock(inode->block[i])); uint64_t addr = block.vaddr(); @@ -71,6 +75,7 @@ glcr::ErrorOr> Ext2Driver::ReadDirectory( DirEntry* entry = reinterpret_cast(addr); directory.PushBack(*entry); glcr::StringView name(entry->name, entry->name_len); +#if EXT2_DEBUG switch (entry->file_type) { case kExt2FtFile: dbgln("FILE (0x{x}): {}", entry->inode, name); @@ -81,6 +86,7 @@ glcr::ErrorOr> Ext2Driver::ReadDirectory( default: dbgln("UNK (0x{x}): {}", entry->inode, name); } +#endif addr += entry->record_length; } }