From 4a4fcca956adf5c24e4363ee0e13bd489a213a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 15 Nov 2003 15:15:54 +0000 Subject: [PATCH] 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 --- src/kernel/core/fs/pipefs.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kernel/core/fs/pipefs.cpp b/src/kernel/core/fs/pipefs.cpp index d600e4bf3d..ae3d6409ca 100644 --- a/src/kernel/core/fs/pipefs.cpp +++ b/src/kernel/core/fs/pipefs.cpp @@ -134,6 +134,7 @@ class Inode { status_t WriteBufferToChain(const 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 uint32 hash_func(void *_node, const void *_key, uint32 range); @@ -487,7 +488,7 @@ Inode::ReadBufferFromChain(void *buffer, size_t *_bufferSize) return B_OK; } - size_t length = cbuf_get_length(fBufferChain); + size_t length = BytesInChain(); // we read *_bufferSize bytes at maximum - but never // 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_ino = inode->ID(); - stat->st_size = cbuf_get_length(fBufferChain); + stat->st_size = inode->BytesInChain(); stat->st_mode = inode->Type() | 0777; return 0;