libsquashfs 1.3.0
A new set of tools and libraries for working with SquashFS images
Loading...
Searching...
No Matches
id_table.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-3.0-or-later */
2/*
3 * id_table.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_ID_TABLE_H
21#define SQFS_ID_TABLE_H
22
23#include "sqfs/predef.h"
24
46#ifdef __cplusplus
47extern "C" {
48#endif
49
59SQFS_API sqfs_id_table_t *sqfs_id_table_create(sqfs_u32 flags);
60
72SQFS_API int sqfs_id_table_id_to_index(sqfs_id_table_t *tbl, sqfs_u32 id,
73 sqfs_u16 *out);
74
89 sqfs_super_t *super, sqfs_compressor_t *cmp);
90
105 const sqfs_super_t *super,
106 sqfs_compressor_t *cmp);
107
120 sqfs_u16 index, sqfs_u32 *out);
121
122#ifdef __cplusplus
123}
124#endif
125
126#endif /* SQFS_ID_TABLE_H */
Includes forward declarations of data structures, macros and integer types.
Encapsultes a compressor with a simple interface to compress or extract chunks of data.
Definition: compressor.h:40
Abstracts file I/O to make it easy to embedd SquashFS.
Definition: io.h:94
A simple data structure that encapsulates ID to index mapping for user and group IDs.
SQFS_API int sqfs_id_table_id_to_index(sqfs_id_table_t *tbl, sqfs_u32 id, sqfs_u16 *out)
Resolve a 32 bit ID to a unique 16 bit index.
SQFS_API sqfs_id_table_t * sqfs_id_table_create(sqfs_u32 flags)
Create an ID table object.
SQFS_API int sqfs_id_table_read(sqfs_id_table_t *tbl, sqfs_file_t *file, const sqfs_super_t *super, sqfs_compressor_t *cmp)
Read an ID table from disk.
SQFS_API int sqfs_id_table_write(sqfs_id_table_t *tbl, sqfs_file_t *file, sqfs_super_t *super, sqfs_compressor_t *cmp)
Write an ID table to disk.
SQFS_API int sqfs_id_table_index_to_id(const sqfs_id_table_t *tbl, sqfs_u16 index, sqfs_u32 *out)
Resolve a 16 bit index to a 32 bit ID.
The SquashFS super block, located at the beginning of the file system to describe the layout of the f...
Definition: super.h:47