diff options
Diffstat (limited to 'libbcachefs/dirent_format.h')
-rw-r--r-- | libbcachefs/dirent_format.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/libbcachefs/dirent_format.h b/libbcachefs/dirent_format.h index 5e116b88..2e766032 100644 --- a/libbcachefs/dirent_format.h +++ b/libbcachefs/dirent_format.h @@ -29,9 +29,25 @@ struct bch_dirent { * Copy of mode bits 12-15 from the target inode - so userspace can get * the filetype without having to do a stat() */ - __u8 d_type; +#if defined(__LITTLE_ENDIAN_BITFIELD) + __u8 d_type:5, + d_unused:2, + d_casefold:1; +#elif defined(__BIG_ENDIAN_BITFIELD) + __u8 d_casefold:1, + d_unused:2, + d_type:5; +#endif - __u8 d_name[]; + union { + struct { + __u8 d_pad; + __le16 d_name_len; + __le16 d_cf_name_len; + __u8 d_names[0]; + } d_cf_name_block __packed; + __u8 d_name[0]; + } __packed; } __packed __aligned(8); #define DT_SUBVOL 16 |