Cleaned the debug mess mmu_man created (thanks anyway).

Switched to kernel_cpp.h/cpp.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6288 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-01-25 14:43:37 +00:00
parent 55b5474b8b
commit b53b9c0cd9
2 changed files with 10 additions and 36 deletions

View File

@ -6,12 +6,13 @@
#include "Debug.h"
#include "cpp.h"
#include "Inode.h"
#include "BPlusTree.h"
#include "Stream.h"
#include "Index.h"
#include <kernel_cpp.h>
#include <string.h>
#include <stdio.h>
@ -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 -

View File

@ -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