Forgot to check the fix... it now compiles again, and there is a new
accessor method Inode::BytesInChain(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5379 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b92791bf92
commit
4a4fcca956
@ -134,6 +134,7 @@ class Inode {
|
|||||||
|
|
||||||
status_t WriteBufferToChain(const void *buffer, size_t bufferSize);
|
status_t WriteBufferToChain(const void *buffer, size_t bufferSize);
|
||||||
status_t ReadBufferFromChain(void *buffer, size_t *_bufferSize);
|
status_t ReadBufferFromChain(void *buffer, size_t *_bufferSize);
|
||||||
|
off_t BytesInChain() const { return cbuf_get_length(fBufferChain); }
|
||||||
|
|
||||||
static int32 HashNextOffset();
|
static int32 HashNextOffset();
|
||||||
static uint32 hash_func(void *_node, const void *_key, uint32 range);
|
static uint32 hash_func(void *_node, const void *_key, uint32 range);
|
||||||
@ -487,7 +488,7 @@ Inode::ReadBufferFromChain(void *buffer, size_t *_bufferSize)
|
|||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t length = cbuf_get_length(fBufferChain);
|
size_t length = BytesInChain();
|
||||||
|
|
||||||
// we read *_bufferSize bytes at maximum - but never
|
// we read *_bufferSize bytes at maximum - but never
|
||||||
// more than there are in the chain
|
// more than there are in the chain
|
||||||
@ -1208,7 +1209,7 @@ pipefs_read_stat(fs_volume _volume, fs_vnode _node, struct stat *stat)
|
|||||||
|
|
||||||
stat->st_dev = volume->ID();
|
stat->st_dev = volume->ID();
|
||||||
stat->st_ino = inode->ID();
|
stat->st_ino = inode->ID();
|
||||||
stat->st_size = cbuf_get_length(fBufferChain);
|
stat->st_size = inode->BytesInChain();
|
||||||
stat->st_mode = inode->Type() | 0777;
|
stat->st_mode = inode->Type() | 0777;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user