Skip to content

Commit eed6031

Browse files
committed
Fix EXT2_DEBUG build.
1 parent 0dd5279 commit eed6031

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

VirtualFileSystem/Ext2FileSystem.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ bool Ext2FS::initialize()
8888
kprintf("ext2fs: %u inodes, %u blocks\n", superBlock.s_inodes_count, superBlock.s_blocks_count);
8989
kprintf("ext2fs: block size = %u\n", EXT2_BLOCK_SIZE(&superBlock));
9090
kprintf("ext2fs: first data block = %u\n", superBlock.s_first_data_block);
91-
kprintf("ext2fs: inodes per block = %u\n", inodesPerBlock());
92-
kprintf("ext2fs: inodes per group = %u\n", inodesPerGroup());
91+
kprintf("ext2fs: inodes per block = %u\n", inodes_per_block());
92+
kprintf("ext2fs: inodes per group = %u\n", inodes_per_group());
9393
kprintf("ext2fs: free inodes = %u\n", superBlock.s_free_inodes_count);
9494
kprintf("ext2fs: desc per block = %u\n", EXT2_DESC_PER_BLOCK(&superBlock));
9595
kprintf("ext2fs: desc size = %u\n", EXT2_DESC_SIZE(&superBlock));
@@ -109,7 +109,7 @@ bool Ext2FS::initialize()
109109

110110
#ifdef EXT2_DEBUG
111111
for (unsigned i = 1; i <= m_blockGroupCount; ++i) {
112-
auto& group = blockGroupDescriptor(i);
112+
auto& group = group_descriptor(i);
113113
kprintf("ext2fs: group[%u] { block_bitmap: %u, inode_bitmap: %u, inode_table: %u }\n",
114114
i,
115115
group.bg_block_bitmap,
@@ -333,7 +333,8 @@ ssize_t Ext2FSInode::read_bytes(Unix::off_t offset, size_t count, byte* buffer,
333333
byte* out = buffer;
334334

335335
#ifdef EXT2_DEBUG
336-
kprintf("ok let's do it, read(%llu, %u) -> blocks %u thru %u, oifb: %u\n", offset, count, firstBlockLogicalIndex, lastBlockLogicalIndex, offsetIntoFirstBlock);
336+
kprintf("Ext2FS: Reading %u bytes %d bytes into inode %u:%u to %p\n", count, offset, identifier().fsid(), identifier().index(), buffer);
337+
//kprintf("ok let's do it, read(%u, %u) -> blocks %u thru %u, oifb: %u\n", offset, count, first_block_logical_index, last_block_logical_index, offset_into_first_block);
337338
#endif
338339

339340
for (dword bi = first_block_logical_index; remaining_count && bi <= last_block_logical_index; ++bi) {
@@ -396,7 +397,7 @@ bool Ext2FSInode::traverse_as_directory(Function<bool(const FS::DirectoryEntry&)
396397
while (entry < buffer.end_pointer()) {
397398
if (entry->inode != 0) {
398399
#ifdef EXT2_DEBUG
399-
kprintf("Ext2Inode::traverse_as_directory: %u, name_len: %u, rec_len: %u, file_type: %u, name: %s\n", entry->inode, entry->name_len, entry->rec_len, entry->file_type, namebuf);
400+
kprintf("Ext2Inode::traverse_as_directory: %u, name_len: %u, rec_len: %u, file_type: %u, name: %s\n", entry->inode, entry->name_len, entry->rec_len, entry->file_type, entry->name);
400401
#endif
401402
if (!callback({ entry->name, entry->name_len, { fsid(), entry->inode }, entry->file_type }))
402403
break;

0 commit comments

Comments
 (0)