* Added some stat data setters.
* Added virtual methods needed for files. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37506 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4cc1203416
commit
4a6cd3b3f9
@ -11,6 +11,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "Block.h"
|
||||
#include "DebugSupport.h"
|
||||
|
||||
|
||||
static inline uint64
|
||||
@ -69,6 +70,41 @@ Node::~Node()
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
Node::InitForVFS()
|
||||
{
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
Node::DeletingNode(Transaction& transaction)
|
||||
{
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
Node::Resize(uint64 newSize, bool fillWithZeroes, Transaction& transaction)
|
||||
{
|
||||
RETURN_ERROR(B_BAD_VALUE);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
Node::Read(off_t pos, void* buffer, size_t size, size_t& _bytesRead)
|
||||
{
|
||||
RETURN_ERROR(B_BAD_VALUE);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
Node::Write(off_t pos, const void* buffer, size_t size, size_t& _bytesWritten)
|
||||
{
|
||||
RETURN_ERROR(B_BAD_VALUE);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Node::SetParentDirectory(uint32 blockIndex)
|
||||
{
|
||||
@ -85,10 +121,58 @@ Node::SetHardLinks(uint32 value)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Node::SetUID(uint32 uid)
|
||||
{
|
||||
fNode.uid = uid;
|
||||
fNodeDataDirty = true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Node::SetGID(uint32 gid)
|
||||
{
|
||||
fNode.gid = gid;
|
||||
fNodeDataDirty = true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Node::SetSize(uint64 size)
|
||||
{
|
||||
fNode.size = size;
|
||||
fNodeDataDirty = true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Node::SetAccessedTime(uint64 time)
|
||||
{
|
||||
fAccessedTime = time;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Node::SetCreationTime(uint64 time)
|
||||
{
|
||||
fNode.creationTime = time;
|
||||
fNodeDataDirty = true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Node::SetModificationTime(uint64 time)
|
||||
{
|
||||
fNode.modificationTime = time;
|
||||
fNodeDataDirty = true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Node::SetChangeTime(uint64 time)
|
||||
{
|
||||
fNode.changeTime = time;
|
||||
fNodeDataDirty = true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -34,6 +34,16 @@ public:
|
||||
mode_t mode);
|
||||
virtual ~Node();
|
||||
|
||||
virtual status_t InitForVFS();
|
||||
virtual status_t DeletingNode(Transaction& transaction);
|
||||
|
||||
virtual status_t Resize(uint64 newSize, bool fillWithZeroes,
|
||||
Transaction& transaction);
|
||||
virtual status_t Read(off_t pos, void* buffer, size_t size,
|
||||
size_t& _bytesRead);
|
||||
virtual status_t Write(off_t pos, const void* buffer,
|
||||
size_t size, size_t& _bytesWritten);
|
||||
|
||||
inline const checksumfs_node& NodeData() const { return fNode; }
|
||||
inline Volume* GetVolume() const { return fVolume; }
|
||||
inline uint64 BlockIndex() const { return fBlockIndex; }
|
||||
@ -50,7 +60,13 @@ public:
|
||||
|
||||
void SetParentDirectory(uint32 blockIndex);
|
||||
void SetHardLinks(uint32 value);
|
||||
void SetUID(uint32 uid);
|
||||
void SetGID(uint32 gid);
|
||||
void SetSize(uint64 size);
|
||||
void SetAccessedTime(uint64 time);
|
||||
void SetCreationTime(uint64 time);
|
||||
void SetModificationTime(uint64 time);
|
||||
void SetChangeTime(uint64 time);
|
||||
|
||||
void Touched(int32 mode);
|
||||
|
||||
@ -59,7 +75,7 @@ public:
|
||||
inline bool WriteLock();
|
||||
inline void WriteUnlock();
|
||||
|
||||
void RevertNodeData(const checksumfs_node& nodeData);
|
||||
virtual void RevertNodeData(const checksumfs_node& nodeData);
|
||||
|
||||
status_t Flush(Transaction& transaction);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user