diff --git a/src/add-ons/kernel/file_systems/bfs/Inode.cpp b/src/add-ons/kernel/file_systems/bfs/Inode.cpp index 3e6796c66f..1f0f464730 100644 --- a/src/add-ons/kernel/file_systems/bfs/Inode.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Inode.cpp @@ -6,12 +6,13 @@ #include "Debug.h" -#include "cpp.h" #include "Inode.h" #include "BPlusTree.h" #include "Stream.h" #include "Index.h" +#include + #include #include @@ -178,9 +179,9 @@ Inode::Inode(Volume *volume, vnode_id id, bool empty, uint8 reenter) fTree(NULL), fLock() { -#ifdef DEBUG - kprintf("Inode::Inode(0x%08lx, %Ld, %s, %s) @ 0x%08lx\n", (uint32)volume, id, empty?"t":"f", reenter?"t":"f", (uint32)this); -#endif + PRINT(("Inode::Inode(%p, %Ld, %s, %s) @ %p\n", + volume, id, empty ? "empty" : "not-empty", reenter ? "reenter":"not-reenter", this)); + Initialize(); } @@ -190,18 +191,16 @@ Inode::Inode(CachedBlock *cached) fTree(NULL), fLock() { -#ifdef DEBUG - kprintf("Inode::Inode(0x%08lx) @ 0x%08lx\n", (uint32)cached, (uint32)this); -#endif + PRINT(("Inode::Inode(%p) @ %p\n", cached, this)); + Initialize(); } Inode::~Inode() { -#ifdef DEBUG - kprintf("Inode::~Inode() @ 0x%08lx\n", (uint32)this); -#endif + PRINT(("Inode::~Inode() @ %p\n", this)); + delete fTree; } @@ -2056,19 +2055,6 @@ Inode::Create(Transaction *transaction, Inode *parent, const char *name, int32 m return B_OK; } -void -Inode::KDumpMe() -{ - kprintf("Inode {\n"); - CachedBlock::KDumpMe(); - kprintf("fTree = 0x%08lx\n", (uint32)fTree); - kprintf("fAttributes = 0x%08lx\n", (uint32)fAttributes); - kprintf("fLock {}\n"); - kprintf("fOldSize = 0x%16Lx\n", fOldSize); - kprintf("fOldLastModified = 0x%16Lx\n", fOldLastModified); - kprintf("}\n"); -} - // #pragma mark - diff --git a/src/add-ons/kernel/file_systems/bfs/Inode.h b/src/add-ons/kernel/file_systems/bfs/Inode.h index 9ab034a897..a923819c6e 100644 --- a/src/add-ons/kernel/file_systems/bfs/Inode.h +++ b/src/add-ons/kernel/file_systems/bfs/Inode.h @@ -71,8 +71,6 @@ class CachedBlock { off_t BlockNumber() const { return fBlockNumber; } uint32 BlockSize() const { return fVolume->BlockSize(); } uint32 BlockShift() const { return fVolume->BlockShift(); } - - void KDumpMe(); private: CachedBlock(const CachedBlock &); @@ -179,13 +177,12 @@ class Inode : public CachedBlock { off_t OldSize() { return fOldSize; } off_t OldLastModified() { return fOldLastModified; } - void KDumpMe(); - private: Inode(const Inode &); Inode &operator=(const Inode &); // no implementation + friend void dump_inode(Inode &inode); friend AttributeIterator; friend InodeAllocator; @@ -379,15 +376,6 @@ CachedBlock::WriteBack(Transaction *transaction) return transaction->WriteBlocks(fBlockNumber, fBlock); } -inline void -CachedBlock::KDumpMe() -{ - kprintf("CachedBlock {\n"); - kprintf("fVolume = 0x%08lx\n", (uint32)fVolume); - kprintf("fBlockNumber = 0x%16Lx\n", fBlockNumber); - kprintf("fBlock = 0x%08lx\n", (uint32)fBlock); - kprintf("}\n"); -} /** Converts the "omode", the open flags given to bfs_open(), into * access modes, e.g. since O_RDONLY requires read access to the