The SquashFS super block, located at the beginning of the file system to describe the layout of the filesystem.
More...
#include <super.h>
The SquashFS super block, located at the beginning of the file system to describe the layout of the filesystem.
- Examples
- list_files.c.
Definition at line 47 of file super.h.
◆ sqfs_super_init()
Initialize the SquashFS super block.
- Parameters
-
super | A pointer to a super block structure. |
block_size | The uncompressed size of the data blocks in bytes. |
mtime | The modification time stamp to set. |
compressor | The compressor ID to set. |
- Returns
- Zero on success, an SQFS_ERROR value if one of the fields does not hold a valid value.
◆ sqfs_super_read()
Read a SquashFS super block from disk, decode it and check the fields.
- Parameters
-
super | A pointer to the super block structure to fill. |
file | A file object through which to access the filesystem image. |
- Returns
- Zero on success, an SQFS_ERROR value if one of the fields does not hold a valid value.
◆ sqfs_super_write()
Encode and write a SquashFS super block to disk.
- Parameters
-
super | A pointer to the super block structure to write. |
file | A file object through which to access the filesystem image. |
- Returns
- Zero on success, an SQFS_ERROR value if one of the fields does not hold a valid value.
◆ block_log
The log2 of the block_size field for sanity checking.
Must be no less than 12 and not larger than 20.
Definition at line 91 of file super.h.
◆ block_size
The data block size in bytes.
Must be a power of 2, no less than 4k and not larger than 1M.
- Examples
- list_files.c.
Definition at line 72 of file super.h.
◆ bytes_used
Total size of the file system in bytes, not counting padding.
Definition at line 127 of file super.h.
◆ compression_id
◆ directory_table_start
sqfs_u64 directory_table_start |
On-disk location of the first meta data block containing the directory entries.
This value must point to a location after the inode table but before the fragment, export, ID and xattr tables.
Definition at line 164 of file super.h.
◆ export_table_start
sqfs_u64 export_table_start |
On-disk location of the export table (if present)
This value must either point to a location after directory table (and if present after the fragment table), but before the ID table, or it must be set to 0xFFFFFFFF to indicate that the table is not present.
Definition at line 183 of file super.h.
◆ flags
A combination of SQFS_SUPER_FLAGS flags.
Most of the flags that can be set here are informative only.
Definition at line 98 of file super.h.
◆ fragment_entry_count
sqfs_u32 fragment_entry_count |
The number of fragment blocks in the data area.
Definition at line 77 of file super.h.
◆ fragment_table_start
sqfs_u64 fragment_table_start |
On-disk location of the fragment table (if present)
This value must either point to a location after the directory table, but before the export, ID and xattr tables, or it must be set to 0xFFFFFFFF to indicate that the table is not present.
Definition at line 173 of file super.h.
◆ id_count
The total number of unique user or group IDs.
Definition at line 103 of file super.h.
◆ id_table_start
On-disk location of the ID table.
This value must point to a location after the directory table and (if present) after the export and fragment tables, but before the xattr table.
Definition at line 136 of file super.h.
◆ inode_count
Total number of inodes.
Definition at line 56 of file super.h.
◆ inode_table_start
sqfs_u64 inode_table_start |
On-disk location of the first meta data block containing the inodes.
This value must point to a location before the directory table.
Definition at line 155 of file super.h.
◆ magic
Magic number. Must be set to SQFS_MAGIC.
Definition at line 51 of file super.h.
◆ modification_time
sqfs_u32 modification_time |
Last time the filesystem was modified.
This field counts seconds (not counting leap seconds) since 00:00, Jan 1 1970 UTC. This field is unsigned, so it expires in the year 2106 (as opposed to 2038).
Definition at line 65 of file super.h.
◆ root_inode_ref
A reference to the root inode.
The bits 16 to 48 hold an offset that is added to inode_table_start to get the location of the meta data block containing the inode. The lower 16 bits hold a byte offset into the uncompressed block.
Definition at line 122 of file super.h.
◆ version_major
Must be SQFS_VERSION_MAJOR.
Definition at line 108 of file super.h.
◆ version_minor
Must be SQFS_VERSION_MINOR.
Definition at line 113 of file super.h.
◆ xattr_id_table_start
sqfs_u64 xattr_id_table_start |
On-disk location of the extended attribute table (if present)
See sqfs_xattr_reader_t for an overview on how SquashFS stores extended attributes on disk.
This value must either point to a location after the ID table, or it must be set to 0xFFFFFFFF to indicate the table is not present.
Definition at line 147 of file super.h.
The documentation for this struct was generated from the following file: