1
0
mirror of https://github.com/Zygo/bees.git synced 2025-07-31 21:13:27 +02:00

fs: add btrfs_inode_flags_ntoa

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell
2025-07-09 01:09:09 -04:00
parent 16e3dd7f60
commit e9e6870de8
2 changed files with 23 additions and 0 deletions

View File

@@ -208,6 +208,7 @@ namespace crucible {
ostream & operator<<(ostream &os, const BtrfsIoctlSearchKey &key);
string btrfs_chunk_type_ntoa(uint64_t type);
string btrfs_inode_flags_ntoa(uint64_t inode_flags);
string btrfs_search_type_ntoa(unsigned type);
string btrfs_search_objectid_ntoa(uint64_t objectid);
string btrfs_compress_type_ntoa(uint8_t type);

View File

@@ -987,6 +987,28 @@ namespace crucible {
return bits_ntoa(objectid, table);
}
string
btrfs_inode_flags_ntoa(uint64_t const inode_flags)
{
static const bits_ntoa_table table[] = {
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_NODATASUM),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_NODATACOW),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_READONLY),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_NOCOMPRESS),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_PREALLOC),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_SYNC),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_IMMUTABLE),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_APPEND),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_NODUMP),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_NOATIME),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_DIRSYNC),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_COMPRESS),
NTOA_TABLE_ENTRY_BITS(BTRFS_INODE_ROOT_ITEM_INIT),
NTOA_TABLE_ENTRY_END()
};
return bits_ntoa(inode_flags, table);
}
ostream &
operator<<(ostream &os, const btrfs_ioctl_search_key &key)
{