libsquashfs 1.3.0
A new set of tools and libraries for working with SquashFS images
Loading...
Searching...
No Matches
dir.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-3.0-or-later */
2/*
3 * dir.h - This file is part of libsquashfs
4 *
5 * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published
9 * by the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20#ifndef SQFS_DIR_H
21#define SQFS_DIR_H
22
23#include "sqfs/predef.h"
24
32#define SQFS_MAX_DIR_ENT 256
33
50 sqfs_u32 count;
51
57 sqfs_u32 start_block;
58
62 sqfs_u32 inode_number;
63};
64
79 sqfs_u16 offset;
80
85 sqfs_s16 inode_diff;
86
91 sqfs_u16 type;
92
98 sqfs_u16 size;
99
103 sqfs_u8 name[];
104};
105
119 sqfs_u32 index;
120
125 sqfs_u32 start_block;
126
132 sqfs_u32 size;
133
139 sqfs_u8 name[];
140};
141
142#endif /* SQFS_DIR_H */
Includes forward declarations of data structures, macros and integer types.
On-disk data structure of a directory entry. Many of these follow a single sqfs_dir_header_t.
Definition: dir.h:74
sqfs_s16 inode_diff
Signed difference of the inode number from the one in the sqfs_dir_header_t.
Definition: dir.h:85
sqfs_u16 offset
An offset into the uncompressed meta data block containing the coresponding inode.
Definition: dir.h:79
sqfs_u16 size
The size of the entry name.
Definition: dir.h:98
sqfs_u8 name[]
The name of the directory entry (no trailing null-byte).
Definition: dir.h:103
sqfs_u16 type
The SQFS_INODE_TYPE value for the inode that this entry represents.
Definition: dir.h:91
On-disk data structure of a directory header.
Definition: dir.h:42
sqfs_u32 inode_number
The inode number of the first entry.
Definition: dir.h:62
sqfs_u32 start_block
The location of the meta data block containing the inodes for the entries that follow,...
Definition: dir.h:57
sqfs_u32 count
The number of sqfs_dir_entry_t entries that are following.
Definition: dir.h:50
On-disk data structure of a directory index. A series of those can follow an sqfs_inode_dir_ext_t.
Definition: dir.h:115
sqfs_u32 index
Linear byte offset into the decompressed directory listing.
Definition: dir.h:119
sqfs_u32 size
Size of the name of the first entry after the header.
Definition: dir.h:132
sqfs_u8 name[]
Name of the name of the first entry after the header.
Definition: dir.h:139
sqfs_u32 start_block
Location of the meta data block, relative to the directory table start.
Definition: dir.h:125