Added blockgroup Flags()/SetFlags() and flag definitions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39916 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -196,6 +196,11 @@ struct ext2_super_block {
|
|||||||
|
|
||||||
#define EXT2_BLOCK_GROUP_NORMAL_SIZE 32
|
#define EXT2_BLOCK_GROUP_NORMAL_SIZE 32
|
||||||
|
|
||||||
|
// block group flags
|
||||||
|
#define EXT2_BLOCK_GROUP_INODE_UNINIT 0x1
|
||||||
|
#define EXT2_BLOCK_GROUP_BLOCK_UNINIT 0x2
|
||||||
|
|
||||||
|
|
||||||
struct ext2_block_group {
|
struct ext2_block_group {
|
||||||
uint32 block_bitmap;
|
uint32 block_bitmap;
|
||||||
uint32 inode_bitmap;
|
uint32 inode_bitmap;
|
||||||
@@ -265,7 +270,8 @@ struct ext2_block_group {
|
|||||||
((uint32)B_LENDIAN_TO_HOST_INT16(used_directories_high) << 16);
|
((uint32)B_LENDIAN_TO_HOST_INT16(used_directories_high) << 16);
|
||||||
return dirs;
|
return dirs;
|
||||||
}
|
}
|
||||||
|
uint16 Flags() const { return B_LENDIAN_TO_HOST_INT16(flags); }
|
||||||
|
|
||||||
|
|
||||||
void SetFreeBlocks(uint32 freeBlocks, bool has64bits)
|
void SetFreeBlocks(uint32 freeBlocks, bool has64bits)
|
||||||
{
|
{
|
||||||
@@ -288,6 +294,11 @@ struct ext2_block_group {
|
|||||||
used_directories_high =
|
used_directories_high =
|
||||||
B_HOST_TO_LENDIAN_INT16(usedDirectories >> 16);
|
B_HOST_TO_LENDIAN_INT16(usedDirectories >> 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetFlags(uint16 newFlags)
|
||||||
|
{
|
||||||
|
flags = B_HOST_TO_LENDIAN_INT16(newFlags);
|
||||||
|
}
|
||||||
} _PACKED;
|
} _PACKED;
|
||||||
|
|
||||||
#define EXT2_DIRECT_BLOCKS 12
|
#define EXT2_DIRECT_BLOCKS 12
|
||||||
|
|||||||
Reference in New Issue
Block a user