43 SQFS_INODE_SOCKET = 7,
44 SQFS_INODE_EXT_DIR = 8,
45 SQFS_INODE_EXT_FILE = 9,
46 SQFS_INODE_EXT_SLINK = 10,
47 SQFS_INODE_EXT_BDEV = 11,
48 SQFS_INODE_EXT_CDEV = 12,
49 SQFS_INODE_EXT_FIFO = 13,
50 SQFS_INODE_EXT_SOCKET = 14,
96 SQFS_INODE_OTHERS_X = 00001,
97 SQFS_INODE_OTHERS_W = 00002,
98 SQFS_INODE_OTHERS_R = 00004,
99 SQFS_INODE_OTHERS_MASK = 00007,
101 SQFS_INODE_GROUP_X = 00010,
102 SQFS_INODE_GROUP_W = 00020,
103 SQFS_INODE_GROUP_R = 00040,
104 SQFS_INODE_GROUP_MASK = 00070,
106 SQFS_INODE_OWNER_X = 00100,
107 SQFS_INODE_OWNER_W = 00200,
108 SQFS_INODE_OWNER_R = 00400,
109 SQFS_INODE_OWNER_MASK = 00700,
111 SQFS_INODE_STICKY = 01000,
112 SQFS_INODE_SET_GID = 02000,
113 SQFS_INODE_SET_UID = 04000,
115 SQFS_INODE_MODE_FIFO = 0010000,
116 SQFS_INODE_MODE_CHR = 0020000,
117 SQFS_INODE_MODE_DIR = 0040000,
118 SQFS_INODE_MODE_BLK = 0060000,
119 SQFS_INODE_MODE_REG = 0100000,
120 SQFS_INODE_MODE_LNK = 0120000,
121 SQFS_INODE_MODE_SOCK = 0140000,
122 SQFS_INODE_MODE_MASK = 0170000,
675 sqfs_u32 index, sqfs_u32 offset);
704 sqfs_u32 *index, sqfs_u32 *offset);
SQFS_INODE_TYPE
Used by sqfs_inode_t to identify the inode type.
SQFS_INODE_MODE
Mode bits for the sqfs_inode_t mode field.
Includes forward declarations of data structures, macros and integer types.
On-disk data structure of a directory index. A series of those can follow an sqfs_inode_dir_ext_t.
Follows a sqfs_inode_t if type is SQFS_INODE_EXT_BDEV or SQFS_INODE_EXT_CDEV.
sqfs_u32 xattr_idx
Extended attribute index.
sqfs_u32 devno
Device number.
sqfs_u32 nlink
Number of hard links to this node.
Follows a sqfs_inode_t if type is SQFS_INODE_BDEV or SQFS_INODE_CDEV.
sqfs_u32 devno
Device number.
sqfs_u32 nlink
Number of hard links to this node.
Follows a sqfs_inode_t if type is SQFS_INODE_EXT_DIR.
sqfs_u32 size
Size of all directory entries and headers in bytes plus 3.
sqfs_u16 offset
Offset into the uncompressed start block where the header can be found.
sqfs_u32 xattr_idx
Extended attribute index.
sqfs_u16 inodex_count
Number of directory index entries following the inode.
sqfs_u32 start_block
Offset from the directory table start to the location of the meta data block containing the first dir...
sqfs_u32 nlink
Number of hard links to this node.
sqfs_u32 parent_inode
Inode number of the parent directory containing this directory inode.
Follows a sqfs_inode_t if type is SQFS_INODE_DIR.
sqfs_u16 offset
Offset into the uncompressed start block where the header can be found.
sqfs_u16 size
Combined size of all directory entries and headers in bytes.
sqfs_u32 start_block
Offset from the directory table start to the location of the meta data block containing the first dir...
sqfs_u32 nlink
Number of hard links to this node.
sqfs_u32 parent_inode
Inode number of the parent directory containing this directory inode.
Follows a sqfs_inode_t if type is SQFS_INODE_EXT_FILE.
sqfs_u64 sparse
If the file is sparse, holds the number of bytes not written to disk because of the omitted sparse bl...
sqfs_u64 blocks_start
Absolute position of the first data block.
sqfs_u32 xattr_idx
Extended attribute index.
sqfs_u32 fragment_idx
Index into the fragment table or 0xFFFFFFFF if unused.
sqfs_u64 file_size
Total, uncompressed size of the file in bytes.
sqfs_u32 nlink
Number of hard links to this node.
sqfs_u32 fragment_offset
Offset into the uncompressed fragment block or 0xFFFFFFFF if unused.
Follows a sqfs_inode_t if type is SQFS_INODE_FILE.
sqfs_u32 fragment_index
Index into the fragment table or 0xFFFFFFFF if unused.
sqfs_u32 blocks_start
Absolute position of the first data block.
sqfs_u32 file_size
Total, uncompressed size of the file in bytes.
sqfs_u32 fragment_offset
Offset into the uncompressed fragment block or 0xFFFFFFFF if unused.
A generic inode structure that combines all others and provides additional information.
union sqfs_inode_generic_t::@4 data
Type specific inode data.
sqfs_inode_t base
The common fields for all inodes.
SQFS_API int sqfs_inode_set_frag_location(sqfs_inode_generic_t *inode, sqfs_u32 index, sqfs_u32 offset)
Update the file fragment location of a regular file inode.
static SQFS_INLINE size_t sqfs_inode_get_file_block_count(const sqfs_inode_generic_t *inode)
Get the number of file blocks in a regular file inode.
SQFS_API int sqfs_inode_get_frag_location(const sqfs_inode_generic_t *inode, sqfs_u32 *index, sqfs_u32 *offset)
Get the file fragment location of a regular file inode.
SQFS_API int sqfs_inode_set_file_size(sqfs_inode_generic_t *inode, sqfs_u64 size)
Update the file size of a regular file inode.
sqfs_u32 payload_bytes_available
Maximum number of available data bytes in the payload.
SQFS_API int sqfs_inode_make_basic(sqfs_inode_generic_t *inode)
Convert an extended inode to a basic inode if possible.
SQFS_API int sqfs_inode_get_file_size(const sqfs_inode_generic_t *inode, sqfs_u64 *size)
Get the file size of a regular file inode.
sqfs_u32 extra[]
Holds type specific extra data, such as symlink target.
SQFS_API int sqfs_inode_get_file_block_start(const sqfs_inode_generic_t *inode, sqfs_u64 *location)
Get the location of the first data block of a regular file inode.
SQFS_API int sqfs_inode_set_xattr_index(sqfs_inode_generic_t *inode, sqfs_u32 index)
Set the extended attribute index of an inode.
sqfs_u32 payload_bytes_used
Number of used data bytes in the payload.
SQFS_API int sqfs_inode_unpack_dir_index_entry(const sqfs_inode_generic_t *inode, sqfs_dir_index_t **out, size_t index)
Unpack the a directory index structure from an inode.
SQFS_API int sqfs_inode_get_xattr_index(const sqfs_inode_generic_t *inode, sqfs_u32 *out)
Get the extended attribute index of an inode.
SQFS_API int sqfs_inode_make_extended(sqfs_inode_generic_t *inode)
Convert a basic inode to an extended inode.
SQFS_API int sqfs_inode_set_file_block_start(sqfs_inode_generic_t *inode, sqfs_u64 location)
Update the location of the first data block of a regular file inode.
Follows a sqfs_inode_t if type is SQFS_INODE_EXT_FIFO or SQFS_INODE_EXT_SOCKET.
sqfs_u32 xattr_idx
Extended attribute index.
sqfs_u32 nlink
Number of hard links to this node.
Follows a sqfs_inode_t if type is SQFS_INODE_FIFO or SQFS_INODE_SOCKET.
sqfs_u32 nlink
Number of hard links to this node.
Follows a sqfs_inode_t if type is SQFS_INODE_EXT_SLINK.
sqfs_u32 xattr_idx
Extended attribute index.
sqfs_u32 target_size
Size of the symlink target in bytes.
sqfs_u32 nlink
Number of hard links to this node.
Follows a sqfs_inode_t if type is SQFS_INODE_SLINK.
sqfs_u32 target_size
Size of the symlink target in bytes.
sqfs_u32 nlink
Number of hard links to this node.
sqfs_u32 inode_number
Unique inode number.
sqfs_u32 mod_time
Last modifcation time.
sqfs_u16 mode
Mode filed holding permission bits only. The type is derived from the type field.
sqfs_u16 uid_idx
An index into the ID table where the owner UID is located.
sqfs_u16 type
An SQFS_INODE_TYPE value.
sqfs_u16 gid_idx
An index into the ID table where the owner GID is located.