gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26204 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -101,12 +101,12 @@ Inode::FindBlock(off_t offset, uint32& block)
|
||||
|
||||
if (index < EXT2_DIRECT_BLOCKS) {
|
||||
// direct blocks
|
||||
block = B_LENDIAN_TO_HOST_INT32(Node().stream.direct[index]);
|
||||
block = B_LENDIAN_TO_HOST_INT32(Node().u.stream.direct[index]);
|
||||
} else if ((index -= EXT2_DIRECT_BLOCKS) < perBlock) {
|
||||
// indirect blocks
|
||||
CachedBlock cached(fVolume);
|
||||
uint32* indirectBlocks = (uint32*)cached.SetTo(B_LENDIAN_TO_HOST_INT32(
|
||||
Node().stream.indirect));
|
||||
Node().u.stream.indirect));
|
||||
if (indirectBlocks == NULL)
|
||||
return B_IO_ERROR;
|
||||
|
||||
@@ -115,7 +115,7 @@ Inode::FindBlock(off_t offset, uint32& block)
|
||||
// double indirect blocks
|
||||
CachedBlock cached(fVolume);
|
||||
uint32* indirectBlocks = (uint32*)cached.SetTo(B_LENDIAN_TO_HOST_INT32(
|
||||
Node().stream.double_indirect));
|
||||
Node().u.stream.double_indirect));
|
||||
if (indirectBlocks == NULL)
|
||||
return B_IO_ERROR;
|
||||
|
||||
@@ -129,7 +129,7 @@ Inode::FindBlock(off_t offset, uint32& block)
|
||||
// triple indirect blocks
|
||||
CachedBlock cached(fVolume);
|
||||
uint32* indirectBlocks = (uint32*)cached.SetTo(B_LENDIAN_TO_HOST_INT32(
|
||||
Node().stream.triple_indirect));
|
||||
Node().u.stream.triple_indirect));
|
||||
if (indirectBlocks == NULL)
|
||||
return B_IO_ERROR;
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ struct ext2_inode {
|
||||
uint32 triple_indirect;
|
||||
} stream;
|
||||
char symlink[EXT2_SHORT_SYMLINK_LENGTH];
|
||||
};
|
||||
} u;
|
||||
uint32 generation;
|
||||
uint32 file_access_control;
|
||||
union {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
#include <dirent.h>
|
||||
#include <new>
|
||||
#include <util/kernel_cpp.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <fs_cache.h>
|
||||
@@ -414,7 +414,7 @@ ext2_read_link(fs_volume *_volume, fs_vnode *_node, char *buffer,
|
||||
if (inode->Size() > EXT2_SHORT_SYMLINK_LENGTH)
|
||||
return inode->ReadAt(0, (uint8 *)buffer, _bufferSize);
|
||||
|
||||
memcpy(buffer, inode->Node().symlink, *_bufferSize);
|
||||
memcpy(buffer, inode->Node().u.symlink, *_bufferSize);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user