* Since the file cache can access any kind of data (and not just file data),
we must use {read|write}_pages() instead of {read|write}(). * This should fix accessing other file systems than BFS (ie. those that doesn't have an io() function) like ext3 and FAT. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27088 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1a8eb15993
commit
7a253cf5fe
@ -166,10 +166,16 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual status_t InternalIO(off_t offset, void* buffer, size_t* length)
|
virtual status_t InternalIO(off_t offset, void* buffer, size_t* length)
|
||||||
{
|
{
|
||||||
if (fWrite)
|
iovec vec;
|
||||||
return FS_CALL(fVnode, write, fCookie, offset, buffer, length);
|
vec.iov_base = buffer;
|
||||||
|
vec.iov_len = *length;
|
||||||
|
|
||||||
return FS_CALL(fVnode, read, fCookie, offset, buffer, length);
|
if (fWrite) {
|
||||||
|
return FS_CALL(fVnode, write_pages, fCookie, offset, &vec, 1,
|
||||||
|
length);
|
||||||
|
}
|
||||||
|
|
||||||
|
return FS_CALL(fVnode, read_pages, fCookie, offset, &vec, 1, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user