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:
@@ -6,12 +6,13 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Debug.h"
|
#include "Debug.h"
|
||||||
#include "cpp.h"
|
|
||||||
#include "Inode.h"
|
#include "Inode.h"
|
||||||
#include "BPlusTree.h"
|
#include "BPlusTree.h"
|
||||||
#include "Stream.h"
|
#include "Stream.h"
|
||||||
#include "Index.h"
|
#include "Index.h"
|
||||||
|
|
||||||
|
#include <kernel_cpp.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@@ -178,9 +179,9 @@ Inode::Inode(Volume *volume, vnode_id id, bool empty, uint8 reenter)
|
|||||||
fTree(NULL),
|
fTree(NULL),
|
||||||
fLock()
|
fLock()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
PRINT(("Inode::Inode(%p, %Ld, %s, %s) @ %p\n",
|
||||||
kprintf("Inode::Inode(0x%08lx, %Ld, %s, %s) @ 0x%08lx\n", (uint32)volume, id, empty?"t":"f", reenter?"t":"f", (uint32)this);
|
volume, id, empty ? "empty" : "not-empty", reenter ? "reenter":"not-reenter", this));
|
||||||
#endif
|
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,18 +191,16 @@ Inode::Inode(CachedBlock *cached)
|
|||||||
fTree(NULL),
|
fTree(NULL),
|
||||||
fLock()
|
fLock()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
PRINT(("Inode::Inode(%p) @ %p\n", cached, this));
|
||||||
kprintf("Inode::Inode(0x%08lx) @ 0x%08lx\n", (uint32)cached, (uint32)this);
|
|
||||||
#endif
|
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Inode::~Inode()
|
Inode::~Inode()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
PRINT(("Inode::~Inode() @ %p\n", this));
|
||||||
kprintf("Inode::~Inode() @ 0x%08lx\n", (uint32)this);
|
|
||||||
#endif
|
|
||||||
delete fTree;
|
delete fTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2056,19 +2055,6 @@ Inode::Create(Transaction *transaction, Inode *parent, const char *name, int32 m
|
|||||||
return B_OK;
|
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 -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|||||||
@@ -71,8 +71,6 @@ class CachedBlock {
|
|||||||
off_t BlockNumber() const { return fBlockNumber; }
|
off_t BlockNumber() const { return fBlockNumber; }
|
||||||
uint32 BlockSize() const { return fVolume->BlockSize(); }
|
uint32 BlockSize() const { return fVolume->BlockSize(); }
|
||||||
uint32 BlockShift() const { return fVolume->BlockShift(); }
|
uint32 BlockShift() const { return fVolume->BlockShift(); }
|
||||||
|
|
||||||
void KDumpMe();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CachedBlock(const CachedBlock &);
|
CachedBlock(const CachedBlock &);
|
||||||
@@ -179,13 +177,12 @@ class Inode : public CachedBlock {
|
|||||||
off_t OldSize() { return fOldSize; }
|
off_t OldSize() { return fOldSize; }
|
||||||
off_t OldLastModified() { return fOldLastModified; }
|
off_t OldLastModified() { return fOldLastModified; }
|
||||||
|
|
||||||
void KDumpMe();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Inode(const Inode &);
|
Inode(const Inode &);
|
||||||
Inode &operator=(const Inode &);
|
Inode &operator=(const Inode &);
|
||||||
// no implementation
|
// no implementation
|
||||||
|
|
||||||
|
friend void dump_inode(Inode &inode);
|
||||||
friend AttributeIterator;
|
friend AttributeIterator;
|
||||||
friend InodeAllocator;
|
friend InodeAllocator;
|
||||||
|
|
||||||
@@ -379,15 +376,6 @@ CachedBlock::WriteBack(Transaction *transaction)
|
|||||||
return transaction->WriteBlocks(fBlockNumber, fBlock);
|
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
|
/** Converts the "omode", the open flags given to bfs_open(), into
|
||||||
* access modes, e.g. since O_RDONLY requires read access to the
|
* access modes, e.g. since O_RDONLY requires read access to the
|
||||||
|
|||||||
Reference in New Issue
Block a user