libsquashfs
1.3.2
A new set of tools and libraries for working with SquashFS images
Toggle main menu visibility
Loading...
Searching...
No Matches
xattr_writer.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: LGPL-3.0-or-later */
2
/*
3
* xattr_writer.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_XATRR_WRITER_H
21
#define SQFS_XATRR_WRITER_H
22
23
#include "
sqfs/predef.h
"
24
30
54
55
#ifdef __cplusplus
56
extern
"C"
{
57
#endif
58
68
SQFS_API
sqfs_xattr_writer_t
*
sqfs_xattr_writer_create
(sqfs_u32 flags);
69
83
SQFS_API
int
sqfs_xattr_writer_begin
(
sqfs_xattr_writer_t
*xwr, sqfs_u32 flags);
84
97
SQFS_API
int
sqfs_xattr_writer_add
(
sqfs_xattr_writer_t
*xwr,
const
char
*key,
98
const
void
*value,
size_t
size);
99
116
SQFS_API
int
sqfs_xattr_writer_end
(
sqfs_xattr_writer_t
*xwr, sqfs_u32 *out);
117
135
SQFS_API
int
sqfs_xattr_writer_flush
(
const
sqfs_xattr_writer_t
*xwr,
136
sqfs_file_t
*file,
sqfs_super_t
*super,
137
sqfs_compressor_t
*cmp);
138
139
#ifdef __cplusplus
140
}
141
#endif
142
143
#endif
/* SQFS_XATRR_WRITER_H */
predef.h
Includes forward declarations of data structures, macros and integer types.
sqfs_compressor_t
Encapsultes a compressor with a simple interface to compress or extract chunks of data.
Definition
compressor.h:40
sqfs_file_t
Abstracts file I/O to make it easy to embedd SquashFS.
Definition
io.h:94
sqfs_super_t
The SquashFS super block, located at the beginning of the file system to describe the layout of the f...
Definition
super.h:47
sqfs_xattr_writer_t
Abstracts writing of extended attributes to a SquashFS filesystem.
sqfs_xattr_writer_t::sqfs_xattr_writer_begin
SQFS_API int sqfs_xattr_writer_begin(sqfs_xattr_writer_t *xwr, sqfs_u32 flags)
Begin recording a block of key-value pairs.
sqfs_xattr_writer_t::sqfs_xattr_writer_create
SQFS_API sqfs_xattr_writer_t * sqfs_xattr_writer_create(sqfs_u32 flags)
Create an xattr writer instance.
sqfs_xattr_writer_t::sqfs_xattr_writer_end
SQFS_API int sqfs_xattr_writer_end(sqfs_xattr_writer_t *xwr, sqfs_u32 *out)
Finish a generating a key-value block.
sqfs_xattr_writer_t::sqfs_xattr_writer_flush
SQFS_API int sqfs_xattr_writer_flush(const sqfs_xattr_writer_t *xwr, sqfs_file_t *file, sqfs_super_t *super, sqfs_compressor_t *cmp)
Write all recorded key-value pairs to disk.
sqfs_xattr_writer_t::sqfs_xattr_writer_add
SQFS_API int sqfs_xattr_writer_add(sqfs_xattr_writer_t *xwr, const char *key, const void *value, size_t size)
Add a key-value pair to the current block.
include
sqfs
xattr_writer.h
Generated by
1.17.0