summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/common.h8
-rw-r--r--include/sqfs/block.h4
-rw-r--r--include/sqfs/block_processor.h12
-rw-r--r--include/sqfs/block_writer.h8
-rw-r--r--include/sqfs/compressor.h22
-rw-r--r--include/sqfs/data_reader.h8
-rw-r--r--include/sqfs/dir.h2
-rw-r--r--include/sqfs/dir_reader.h22
-rw-r--r--include/sqfs/dir_writer.h8
-rw-r--r--include/sqfs/error.h6
-rw-r--r--include/sqfs/frag_table.h12
-rw-r--r--include/sqfs/id_table.h8
-rw-r--r--include/sqfs/inode.h12
-rw-r--r--include/sqfs/io.h12
-rw-r--r--include/sqfs/meta_reader.h10
-rw-r--r--include/sqfs/meta_writer.h14
-rw-r--r--include/sqfs/super.h20
-rw-r--r--include/sqfs/table.h4
-rw-r--r--include/sqfs/xattr.h12
-rw-r--r--include/sqfs/xattr_reader.h10
-rw-r--r--include/sqfs/xattr_writer.h8
-rw-r--r--lib/common/comp_opt.c4
-rw-r--r--lib/common/compress.c2
-rw-r--r--lib/sqfs/comp/compressor.c6
-rw-r--r--lib/sqfs/super.c2
-rw-r--r--lib/sqfs/xattr.c4
26 files changed, 120 insertions, 120 deletions
diff --git a/include/common.h b/include/common.h
index cf2d1b5..bbdf81d 100644
--- a/include/common.h
+++ b/include/common.h
@@ -59,7 +59,7 @@ typedef struct {
size_t num_jobs;
int outmode;
- E_SQFS_COMPRESSOR comp_id;
+ SQFS_COMPRESSOR comp_id;
bool exportable;
bool no_xattr;
@@ -96,13 +96,13 @@ void sqfs_print_statistics(const sqfs_super_t *super,
void compressor_print_available(void);
-E_SQFS_COMPRESSOR compressor_get_default(void);
+SQFS_COMPRESSOR compressor_get_default(void);
int compressor_cfg_init_options(sqfs_compressor_config_t *cfg,
- E_SQFS_COMPRESSOR id,
+ SQFS_COMPRESSOR id,
size_t block_size, char *options);
-void compressor_print_help(E_SQFS_COMPRESSOR id);
+void compressor_print_help(SQFS_COMPRESSOR id);
int inode_stat(const sqfs_tree_node_t *node, struct stat *sb);
diff --git a/include/sqfs/block.h b/include/sqfs/block.h
index 5e79ff7..7cc815c 100644
--- a/include/sqfs/block.h
+++ b/include/sqfs/block.h
@@ -57,7 +57,7 @@ struct sqfs_fragment_t {
};
/**
- * @enum E_SQFS_BLK_FLAGS
+ * @enum SQFS_BLK_FLAGS
*
* @brief Generic flags that tell the processor what to do with a block and
* flags that the processor sets when it is done with a block.
@@ -136,6 +136,6 @@ typedef enum {
* @brief The combination of all flags that are user settable.
*/
SQFS_BLK_USER_SETTABLE_FLAGS = 0x000F,
-} E_SQFS_BLK_FLAGS;
+} SQFS_BLK_FLAGS;
#endif /* SQFS_BLOCK_H */
diff --git a/include/sqfs/block_processor.h b/include/sqfs/block_processor.h
index d3b6e12..bdd83d9 100644
--- a/include/sqfs/block_processor.h
+++ b/include/sqfs/block_processor.h
@@ -158,10 +158,10 @@ sqfs_block_processor_t *sqfs_block_processor_create(size_t max_block_size,
* @param inode A pointer to a pointer to an inode. The block processor creates
* a file inode and stores a pointer to it here and keeps updating
* the inode as the file grows.
- * @param flags A combination of @ref E_SQFS_BLK_FLAGS that can be used to
+ * @param flags A combination of @ref SQFS_BLK_FLAGS that can be used to
* micro manage how the data is processed.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_block_processor_begin_file(sqfs_block_processor_t *proc,
sqfs_inode_generic_t **inode,
@@ -179,7 +179,7 @@ SQFS_API int sqfs_block_processor_begin_file(sqfs_block_processor_t *proc,
* @param size How many bytes should be copied out of the given
* buffer and written to disk.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_block_processor_append(sqfs_block_processor_t *proc,
const void *data, size_t size);
@@ -198,7 +198,7 @@ SQFS_API int sqfs_block_processor_append(sqfs_block_processor_t *proc,
*
* @param proc A pointer to a data writer object.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_block_processor_end_file(sqfs_block_processor_t *proc);
@@ -209,7 +209,7 @@ SQFS_API int sqfs_block_processor_end_file(sqfs_block_processor_t *proc);
*
* @param proc A pointer to a block processor object.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure. The failure
+ * @return Zero on success, an @ref SQFS_ERROR value on failure. The failure
* return value can either be an error encountered during enqueueing,
* processing or writing to disk.
*/
@@ -227,7 +227,7 @@ SQFS_API int sqfs_block_processor_sync(sqfs_block_processor_t *proc);
*
* @param proc A pointer to a block processor object.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure. The failure
+ * @return Zero on success, an @ref SQFS_ERROR value on failure. The failure
* return value can either be an error encountered during enqueueing,
* processing or writing to disk.
*/
diff --git a/include/sqfs/block_writer.h b/include/sqfs/block_writer.h
index 674c0e7..06131f5 100644
--- a/include/sqfs/block_writer.h
+++ b/include/sqfs/block_writer.h
@@ -77,7 +77,7 @@ struct sqfs_block_hooks_t {
* into account when padding the file.
*
* @param user A user pointer.
- * @param flags A pointer to a combination of @ref E_SQFS_BLK_FLAGS
+ * @param flags A pointer to a combination of @ref SQFS_BLK_FLAGS
* describing the block. The callback can modify the
* user settable flags.
* @param size The size of the block in bytes.
@@ -99,7 +99,7 @@ struct sqfs_block_hooks_t {
* the file.
*
* @param user A user pointer.
- * @param flags A combination of @ref E_SQFS_BLK_FLAGS describing
+ * @param flags A combination of @ref SQFS_BLK_FLAGS describing
* the block.
* @param size The size of the block in bytes.
* @param data A pointer to the raw block data.
@@ -187,7 +187,7 @@ SQFS_API sqfs_block_writer_t *sqfs_block_writer_create(sqfs_file_t *file,
* @param user_ptr A user data pointer that should be passed to the callbacks.
* @param hooks A structure holding various callbacks.
*
- * @return Zero on success, an @ref E_SQFS_ERROR on failure.
+ * @return Zero on success, an @ref SQFS_ERROR on failure.
*/
SQFS_API int sqfs_block_writer_set_hooks(sqfs_block_writer_t *wr,
void *user_ptr,
@@ -215,7 +215,7 @@ SQFS_API int sqfs_block_writer_set_hooks(sqfs_block_writer_t *wr,
* is performed and this returns the (new) location of the
* first block instead.
*
- * @return Zero on success, an @ref E_SQFS_ERROR error on failure.
+ * @return Zero on success, an @ref SQFS_ERROR error on failure.
*/
SQFS_API int sqfs_block_writer_write(sqfs_block_writer_t *wr,
sqfs_u32 size, sqfs_u32 checksum,
diff --git a/include/sqfs/compressor.h b/include/sqfs/compressor.h
index 9a3508a..fd5d7e8 100644
--- a/include/sqfs/compressor.h
+++ b/include/sqfs/compressor.h
@@ -60,7 +60,7 @@ struct sqfs_compressor_t {
* @param file A file to write to.
*
* @return The number of bytes written on success, 0 means default
- * settings are used. A negative value is an @ref E_SQFS_ERROR
+ * settings are used. A negative value is an @ref SQFS_ERROR
* identifier.
*/
int (*write_options)(sqfs_compressor_t *cmp, sqfs_file_t *file);
@@ -71,7 +71,7 @@ struct sqfs_compressor_t {
* @param cmp A pointer to a compressor object.
* @param file A file to read from.
*
- * @return Zero on success or an @ref E_SQFS_ERROR value.
+ * @return Zero on success or an @ref SQFS_ERROR value.
*/
int (*read_options)(sqfs_compressor_t *cmp, sqfs_file_t *file);
@@ -85,7 +85,7 @@ struct sqfs_compressor_t {
* @param outsize The available space in the destination buffer.
*
* @return The number of bytes written to the buffer, a negative
- * value is an @ref E_SQFS_ERROR value. The value 0 means
+ * value is an @ref SQFS_ERROR value. The value 0 means
* the output buffer was too small when extracting or that
* the result is larger than the input when compressing.
*/
@@ -105,7 +105,7 @@ struct sqfs_compressor_t {
*/
struct sqfs_compressor_config_t {
/**
- * @brief An @ref E_SQFS_COMPRESSOR identifier
+ * @brief An @ref SQFS_COMPRESSOR identifier
*/
sqfs_u16 id;
@@ -331,22 +331,22 @@ extern "C" {
* @param block_size The block size to set.
* @param flags The compressor flags to set.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value if some of the options
+ * @return Zero on success, an @ref SQFS_ERROR value if some of the options
* don't make sense (e.g. unknown flags are used).
*/
SQFS_API int sqfs_compressor_config_init(sqfs_compressor_config_t *cfg,
- E_SQFS_COMPRESSOR id,
+ SQFS_COMPRESSOR id,
size_t block_size, sqfs_u16 flags);
/**
* @brief Check if a specified compressor implementation is available.
*
- * @param id An @ref E_SQFS_COMPRESSOR identifier.
+ * @param id An @ref SQFS_COMPRESSOR identifier.
*
* @return true if the implementation is available and can be instantiated
* through @ref sqfs_compressor_create.
*/
-SQFS_API bool sqfs_compressor_exists(E_SQFS_COMPRESSOR id);
+SQFS_API bool sqfs_compressor_exists(SQFS_COMPRESSOR id);
/**
* @brief Create an instance of a compressor implementation.
@@ -366,12 +366,12 @@ sqfs_compressor_t *sqfs_compressor_create(const sqfs_compressor_config_t *cfg);
* use @ref sqfs_compressor_exists to check if a compressor is actually
* available.
*
- * @param id An @ref E_SQFS_COMPRESSOR identifier.
+ * @param id An @ref SQFS_COMPRESSOR identifier.
*
* @return A string holding the name of the compressor, NULL if the compressor
* ID is not known.
*/
-SQFS_API const char *sqfs_compressor_name_from_id(E_SQFS_COMPRESSOR id);
+SQFS_API const char *sqfs_compressor_name_from_id(SQFS_COMPRESSOR id);
/**
* @brief Get the compressor ID using just the name of the backend.
@@ -382,7 +382,7 @@ SQFS_API const char *sqfs_compressor_name_from_id(E_SQFS_COMPRESSOR id);
*
* @param name The name of the compressor backend.
*
- * @return A positive, @ref E_SQFS_COMPRESSOR identifier on success
+ * @return A positive, @ref SQFS_COMPRESSOR identifier on success
* or @ref SQFS_ERROR_UNSUPPORTED if the backend is unknown.
*/
SQFS_API int sqfs_compressor_id_from_name(const char *name);
diff --git a/include/sqfs/data_reader.h b/include/sqfs/data_reader.h
index e058017..58022c9 100644
--- a/include/sqfs/data_reader.h
+++ b/include/sqfs/data_reader.h
@@ -78,7 +78,7 @@ SQFS_API sqfs_data_reader_t *sqfs_data_reader_create(sqfs_file_t *file,
* @param data A pointer to a data reader object.
* @param super A pointer to the super block.
*
- * @return Zero on succcess, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on succcess, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_data_reader_load_fragment_table(sqfs_data_reader_t *data,
const sqfs_super_t *super);
@@ -94,7 +94,7 @@ SQFS_API int sqfs_data_reader_load_fragment_table(sqfs_data_reader_t *data,
* @param out Returns a pointer to the raw data that must be
* released using free.
*
- * @return Zero on succcess, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on succcess, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_data_reader_get_fragment(sqfs_data_reader_t *data,
const sqfs_inode_generic_t *inode,
@@ -112,7 +112,7 @@ SQFS_API int sqfs_data_reader_get_fragment(sqfs_data_reader_t *data,
* @param out Returns a pointer to the raw data that must be
* released using free.
*
- * @return Zero on succcess, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on succcess, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_data_reader_get_block(sqfs_data_reader_t *data,
const sqfs_inode_generic_t *inode,
@@ -135,7 +135,7 @@ SQFS_API int sqfs_data_reader_get_block(sqfs_data_reader_t *data,
* @param size The number of uncompressed bytes to read from the given offset.
*
* @return The number of bytes read on succcess, zero if attempting to read
- * past the end of the file and a negative @ref E_SQFS_ERROR value
+ * past the end of the file and a negative @ref SQFS_ERROR value
* on failure.
*/
SQFS_API sqfs_s32 sqfs_data_reader_read(sqfs_data_reader_t *data,
diff --git a/include/sqfs/dir.h b/include/sqfs/dir.h
index 1a1ce01..8a76f3d 100644
--- a/include/sqfs/dir.h
+++ b/include/sqfs/dir.h
@@ -85,7 +85,7 @@ struct sqfs_dir_entry_t {
sqfs_s16 inode_diff;
/**
- * @brief The @ref E_SQFS_INODE_TYPE value for the inode that this
+ * @brief The @ref SQFS_INODE_TYPE value for the inode that this
* entry represents.
*/
sqfs_u16 type;
diff --git a/include/sqfs/dir_reader.h b/include/sqfs/dir_reader.h
index 7b55eb0..52e97fd 100644
--- a/include/sqfs/dir_reader.h
+++ b/include/sqfs/dir_reader.h
@@ -53,7 +53,7 @@
*/
/**
- * @enum E_SQFS_TREE_FILTER_FLAGS
+ * @enum SQFS_TREE_FILTER_FLAGS
*
* @brief Filter flags for @ref sqfs_dir_reader_get_full_hierarchy
*/
@@ -103,7 +103,7 @@ typedef enum {
SQFS_TREE_STORE_PARENTS = 0x40,
SQFS_TREE_ALL_FLAGS = 0x7F,
-} E_SQFS_TREE_FILTER_FLAGS;
+} SQFS_TREE_FILTER_FLAGS;
/**
* @struct sqfs_tree_node_t
@@ -182,7 +182,7 @@ SQFS_API sqfs_dir_reader_t *sqfs_dir_reader_create(const sqfs_super_t *super,
* @param rd A pointer to a directory reader.
* @param inode An directory or extended directory inode.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_dir_reader_open_dir(sqfs_dir_reader_t *rd,
const sqfs_inode_generic_t *inode);
@@ -194,7 +194,7 @@ SQFS_API int sqfs_dir_reader_open_dir(sqfs_dir_reader_t *rd,
*
* @param rd A pointer to a directory reader.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_dir_reader_rewind(sqfs_dir_reader_t *rd);
@@ -207,7 +207,7 @@ SQFS_API int sqfs_dir_reader_rewind(sqfs_dir_reader_t *rd);
* @param rd A pointer to a directory reader.
* @param name The name of the entry to find.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_dir_reader_find(sqfs_dir_reader_t *rd, const char *name);
@@ -229,7 +229,7 @@ SQFS_API int sqfs_dir_reader_find(sqfs_dir_reader_t *rd, const char *name);
* @param out Returns a pointer to a directory entry on success that can be
* freed with a single free call.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure, a positive
+ * @return Zero on success, an @ref SQFS_ERROR value on failure, a positive
* number if the end of the current directory listing has been reached.
*/
SQFS_API int sqfs_dir_reader_read(sqfs_dir_reader_t *rd,
@@ -244,7 +244,7 @@ SQFS_API int sqfs_dir_reader_read(sqfs_dir_reader_t *rd,
* @param out Returns a pointer to a generic inode that can be freed with a
* single free call.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_dir_reader_get_inode(sqfs_dir_reader_t *rd,
sqfs_inode_generic_t **inode);
@@ -258,7 +258,7 @@ SQFS_API int sqfs_dir_reader_get_inode(sqfs_dir_reader_t *rd,
* @param out Returns a pointer to a generic inode that can be freed with a
* single free call.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_dir_reader_get_root_inode(sqfs_dir_reader_t *rd,
sqfs_inode_generic_t **inode);
@@ -278,7 +278,7 @@ SQFS_API int sqfs_dir_reader_get_root_inode(sqfs_dir_reader_t *rd,
* @param out Returns a pointer to a generic inode that can be freed with a
* single free call.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_dir_reader_find_by_path(sqfs_dir_reader_t *rd,
const sqfs_inode_generic_t *start,
@@ -299,10 +299,10 @@ SQFS_API int sqfs_dir_reader_find_by_path(sqfs_dir_reader_t *rd,
* @param path A path to resolve into an inode. Forward or backward slashes can
* be used to separate path components. Resolving '.' or '..' is
* not supported. Can be set to NULL to get the root inode.
- * @param flags A combination of @ref E_SQFS_TREE_FILTER_FLAGS flags.
+ * @param flags A combination of @ref SQFS_TREE_FILTER_FLAGS flags.
* @param out Returns the top most tree node.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_dir_reader_get_full_hierarchy(sqfs_dir_reader_t *rd,
const sqfs_id_table_t *idtbl,
diff --git a/include/sqfs/dir_writer.h b/include/sqfs/dir_writer.h
index dce5a79..9615a41 100644
--- a/include/sqfs/dir_writer.h
+++ b/include/sqfs/dir_writer.h
@@ -114,7 +114,7 @@ SQFS_API sqfs_dir_writer_t *sqfs_dir_writer_create(sqfs_meta_writer_t *dm,
* @param writer A pointer to a directory writer object.
* @param flags A currently unused flag field. Must be set to 0.
*
- * @return Zero on success, a @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_dir_writer_begin(sqfs_dir_writer_t *writer, sqfs_u32 flags);
@@ -132,7 +132,7 @@ SQFS_API int sqfs_dir_writer_begin(sqfs_dir_writer_t *writer, sqfs_u32 flags);
* @param mode A file mode, i.e. type and permission bits from which the entry
* type is derived internally.
*
- * @return Zero on success, a @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_dir_writer_add_entry(sqfs_dir_writer_t *writer,
const char *name,
@@ -147,7 +147,7 @@ SQFS_API int sqfs_dir_writer_add_entry(sqfs_dir_writer_t *writer,
*
* @param writer A pointer to a directory writer object.
*
- * @return Zero on success, a @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_dir_writer_end(sqfs_dir_writer_t *writer);
@@ -265,7 +265,7 @@ SQFS_API sqfs_inode_generic_t
* @param super A pointer to the super block. Location of the export table and
* the exportable flag are set.
*
- * @return Zero on success, a @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_dir_writer_write_export_table(sqfs_dir_writer_t *writer,
sqfs_file_t *file,
diff --git a/include/sqfs/error.h b/include/sqfs/error.h
index 055e98f..e13d204 100644
--- a/include/sqfs/error.h
+++ b/include/sqfs/error.h
@@ -23,11 +23,11 @@
/**
* @file error.h
*
- * @brief Contains the @ref E_SQFS_ERROR enumerator.
+ * @brief Contains the @ref SQFS_ERROR enumerator.
*/
/**
- * @enum E_SQFS_ERROR
+ * @enum SQFS_ERROR
*
* @brief Error codes that can be returned by various libsquashfs functions.
*/
@@ -145,6 +145,6 @@ typedef enum {
* performed and the object can still be used.
*/
SQFS_ERROR_SEQUENCE = -17,
-} E_SQFS_ERROR;
+} SQFS_ERROR;
#endif /* SQFS_ERROR_H */
diff --git a/include/sqfs/frag_table.h b/include/sqfs/frag_table.h
index 9a66692..fc2c8a4 100644
--- a/include/sqfs/frag_table.h
+++ b/include/sqfs/frag_table.h
@@ -62,7 +62,7 @@ SQFS_API sqfs_frag_table_t *sqfs_frag_table_create(sqfs_u32 flags);
* and size of the table.
* @param cmp The compressor to use for uncompressing the table.
*
- * @return Zero on success, an @ref E_SQFS_ERROR on failure.
+ * @return Zero on success, an @ref SQFS_ERROR on failure.
*/
SQFS_API int sqfs_frag_table_read(sqfs_frag_table_t *tbl, sqfs_file_t *file,
const sqfs_super_t *super,
@@ -83,7 +83,7 @@ SQFS_API int sqfs_frag_table_read(sqfs_frag_table_t *tbl, sqfs_file_t *file,
* and size of the table.
* @param cmp The compressor to use for compressing the table.
*
- * @return Zero on success, an @ref E_SQFS_ERROR on failure.
+ * @return Zero on success, an @ref SQFS_ERROR on failure.
*/
SQFS_API int sqfs_frag_table_write(sqfs_frag_table_t *tbl, sqfs_file_t *file,
sqfs_super_t *super, sqfs_compressor_t *cmp);
@@ -97,7 +97,7 @@ SQFS_API int sqfs_frag_table_write(sqfs_frag_table_t *tbl, sqfs_file_t *file,
* @param index The index into the table.
* @param out Returns the data from the table on success.
*
- * @return Zero on success, an @ref E_SQFS_ERROR on failure (e.g. index is
+ * @return Zero on success, an @ref SQFS_ERROR on failure (e.g. index is
* out of bounds).
*/
SQFS_API int sqfs_frag_table_lookup(sqfs_frag_table_t *tbl, sqfs_u32 index,
@@ -113,7 +113,7 @@ SQFS_API int sqfs_frag_table_lookup(sqfs_frag_table_t *tbl, sqfs_u32 index,
* @param out The size of the block. Has bit 24 set if compressed.
* @param index If not NULL, returns the allocated table index.
*
- * @return Zero on success, an @ref E_SQFS_ERROR on failure (e.g. allocation
+ * @return Zero on success, an @ref SQFS_ERROR on failure (e.g. allocation
* failure).
*/
SQFS_API int sqfs_frag_table_append(sqfs_frag_table_t *tbl, sqfs_u64 location,
@@ -129,7 +129,7 @@ SQFS_API int sqfs_frag_table_append(sqfs_frag_table_t *tbl, sqfs_u64 location,
* @param location The absolute on-disk location of the fragment block.
* @param out The size of the block. Has bit 24 set if compressed.
*
- * @return Zero on success, an @ref E_SQFS_ERROR on
+ * @return Zero on success, an @ref SQFS_ERROR on
* failure (e.g. out of bounds).
*/
SQFS_API int sqfs_frag_table_set(sqfs_frag_table_t *tbl, sqfs_u32 index,
@@ -162,7 +162,7 @@ SQFS_API size_t sqfs_frag_table_get_size(sqfs_frag_table_t *tbl);
* @param size The size of the tail en inside the fragment block.
* @param hash An arbitrary 32 bit data hash to memorize.
*
- * @return Zero on success, an @ref E_SQFS_ERROR on faiure.
+ * @return Zero on success, an @ref SQFS_ERROR on faiure.
*/
SQFS_API int sqfs_frag_table_add_tail_end(sqfs_frag_table_t *tbl,
sqfs_u32 index, sqfs_u32 offset,
diff --git a/include/sqfs/id_table.h b/include/sqfs/id_table.h
index 706687f..16962e2 100644
--- a/include/sqfs/id_table.h
+++ b/include/sqfs/id_table.h
@@ -67,7 +67,7 @@ SQFS_API sqfs_id_table_t *sqfs_id_table_create(sqfs_u32 flags);
* @param id The ID to resolve.
* @param out Returns the unique table index.
*
- * @return Zero on success, an @ref E_SQFS_ERROR on failure.
+ * @return Zero on success, an @ref SQFS_ERROR on failure.
*/
SQFS_API int sqfs_id_table_id_to_index(sqfs_id_table_t *tbl, sqfs_u32 id,
sqfs_u16 *out);
@@ -83,7 +83,7 @@ SQFS_API int sqfs_id_table_id_to_index(sqfs_id_table_t *tbl, sqfs_u32 id,
* start location.
* @param cmp A compressor to use to compress the ID table.
*
- * @return Zero on success, an @ref E_SQFS_ERROR on failure.
+ * @return Zero on success, an @ref SQFS_ERROR on failure.
*/
SQFS_API int sqfs_id_table_write(sqfs_id_table_t *tbl, sqfs_file_t *file,
sqfs_super_t *super, sqfs_compressor_t *cmp);
@@ -99,7 +99,7 @@ SQFS_API int sqfs_id_table_write(sqfs_id_table_t *tbl, sqfs_file_t *file,
* the ID table location.
* @param cmp A compressor to use to extract compressed table blocks.
*
- * @return Zero on success, an @ref E_SQFS_ERROR on failure.
+ * @return Zero on success, an @ref SQFS_ERROR on failure.
*/
SQFS_API int sqfs_id_table_read(sqfs_id_table_t *tbl, sqfs_file_t *file,
const sqfs_super_t *super,
@@ -114,7 +114,7 @@ SQFS_API int sqfs_id_table_read(sqfs_id_table_t *tbl, sqfs_file_t *file,
* @param index The table index to resolve.
* @param out Returns the underlying 32 bit ID that the index maps to.
*
- * @return Zero on success, an @ref E_SQFS_ERROR on failure.
+ * @return Zero on success, an @ref SQFS_ERROR on failure.
*/
SQFS_API int sqfs_id_table_index_to_id(const sqfs_id_table_t *tbl,
sqfs_u16 index, sqfs_u32 *out);
diff --git a/include/sqfs/inode.h b/include/sqfs/inode.h
index a6e7111..c87f965 100644
--- a/include/sqfs/inode.h
+++ b/include/sqfs/inode.h
@@ -29,7 +29,7 @@
*/
/**
- * @enum E_SQFS_INODE_TYPE
+ * @enum SQFS_INODE_TYPE
*
* @brief Used by @ref sqfs_inode_t to identify the inode type.
*/
@@ -48,10 +48,10 @@ typedef enum {
SQFS_INODE_EXT_CDEV = 12,
SQFS_INODE_EXT_FIFO = 13,
SQFS_INODE_EXT_SOCKET = 14,
-} E_SQFS_INODE_TYPE;
+} SQFS_INODE_TYPE;
/**
- * @enum E_SQFS_INODE_MODE
+ * @enum SQFS_INODE_MODE
*
* @brief Mode bits for the @ref sqfs_inode_t mode field.
*
@@ -120,7 +120,7 @@ typedef enum {
SQFS_INODE_MODE_LNK = 0120000,
SQFS_INODE_MODE_SOCK = 0140000,
SQFS_INODE_MODE_MASK = 0170000,
-} E_SQFS_INODE_MODE;
+} SQFS_INODE_MODE;
/**
* @struct sqfs_inode_t
@@ -132,7 +132,7 @@ typedef enum {
*/
struct sqfs_inode_t {
/**
- * @brief An @ref E_SQFS_INODE_TYPE value.
+ * @brief An @ref SQFS_INODE_TYPE value.
*/
sqfs_u16 type;
@@ -140,7 +140,7 @@ struct sqfs_inode_t {
* @brief Mode filed holding permission bits only. The type is derived
* from the type field.
*
- * This field holds a combination of @ref E_SQFS_INODE_MODE flags.
+ * This field holds a combination of @ref SQFS_INODE_MODE flags.
*/
sqfs_u16 mode;
diff --git a/include/sqfs/io.h b/include/sqfs/io.h
index 18c6810..246ac70 100644
--- a/include/sqfs/io.h
+++ b/include/sqfs/io.h
@@ -29,7 +29,7 @@
*/
/**
- * @enum E_SQFS_FILE_OPEN_FLAGS
+ * @enum SQFS_FILE_OPEN_FLAGS
*
* @brief Flags for @ref sqfs_open_file
*/
@@ -55,7 +55,7 @@ typedef enum {
SQFS_FILE_OPEN_OVERWRITE = 0x02,
SQFS_FILE_OPEN_ALL_FLAGS = 0x03,
-} E_SQFS_FILE_OPEN_FLAGS;
+} SQFS_FILE_OPEN_FLAGS;
/**
* @interface sqfs_file_t
@@ -80,7 +80,7 @@ struct sqfs_file_t {
* @param buffer A pointer to a buffer to copy the data to.
* @param size The number of bytes to read from the file.
*
- * @return Zero on success, an @ref E_SQFS_ERROR identifier on failure
+ * @return Zero on success, an @ref SQFS_ERROR identifier on failure
* that the data structures in libsquashfs that use this return
* directly to the caller.
*/
@@ -95,7 +95,7 @@ struct sqfs_file_t {
* @param buffer A pointer to a buffer to write to the file.
* @param size The number of bytes to write from the buffer.
*
- * @return Zero on success, an @ref E_SQFS_ERROR identifier on failure
+ * @return Zero on success, an @ref SQFS_ERROR identifier on failure
* that the data structures in libsquashfs that use this return
* directly to the caller.
*/
@@ -115,7 +115,7 @@ struct sqfs_file_t {
* @param file A pointer to the file object.
* @param size The new capacity of the file in bytes.
*
- * @return Zero on success, an @ref E_SQFS_ERROR identifier on failure
+ * @return Zero on success, an @ref SQFS_ERROR identifier on failure
* that the data structures in libsquashfs that use this return
* directly to the caller.
*/
@@ -137,7 +137,7 @@ extern "C" {
* preserves the value in errno indicating the underlying problem.
*
* @param filename The name of the file to open.
- * @param flags A set of @ref E_SQFS_FILE_OPEN_FLAGS.
+ * @param flags A set of @ref SQFS_FILE_OPEN_FLAGS.
*
* @return A pointer to a file object on success, NULL on allocation failure,
* failure to open the file or if an unknown flag was set.
diff --git a/include/sqfs/meta_reader.h b/include/sqfs/meta_reader.h
index e8b40d4..bac1808 100644
--- a/include/sqfs/meta_reader.h
+++ b/include/sqfs/meta_reader.h
@@ -83,7 +83,7 @@ SQFS_API sqfs_meta_reader_t *sqfs_meta_reader_create(sqfs_file_t *file,
* @param block_start Absolute position where the block header can be found.
* @param offset A byte offset into the uncompressed block.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_meta_reader_seek(sqfs_meta_reader_t *m, sqfs_u64 block_start,
size_t offset);
@@ -114,7 +114,7 @@ SQFS_API void sqfs_meta_reader_get_position(const sqfs_meta_reader_t *m,
* @param data A pointer to copy the data to.
* @param size The numbre of bytes to read.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_meta_reader_read(sqfs_meta_reader_t *m, void *data,
size_t size);
@@ -130,7 +130,7 @@ SQFS_API int sqfs_meta_reader_read(sqfs_meta_reader_t *m, void *data,
* @param m A pointer to a meta data reader.
* @param hdr A pointer to a directory header to fill.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_meta_reader_read_dir_header(sqfs_meta_reader_t *m,
sqfs_dir_header_t *hdr);
@@ -147,7 +147,7 @@ SQFS_API int sqfs_meta_reader_read_dir_header(sqfs_meta_reader_t *m,
* @param ent Returns a pointer to a directory entry. Can be released with a
* single free() call.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_meta_reader_read_dir_ent(sqfs_meta_reader_t *m,
sqfs_dir_entry_t **ent);
@@ -169,7 +169,7 @@ SQFS_API int sqfs_meta_reader_read_dir_ent(sqfs_meta_reader_t *m,
* @param out Returns a pointer to an inode. Can be released with a
* single free() call.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API
int sqfs_meta_reader_read_inode(sqfs_meta_reader_t *ir,
diff --git a/include/sqfs/meta_writer.h b/include/sqfs/meta_writer.h
index 58968f5..0e57c82 100644
--- a/include/sqfs/meta_writer.h
+++ b/include/sqfs/meta_writer.h
@@ -51,7 +51,7 @@
*/
/**
- * @enum E_SQFS_META_WRITER_FLAGS
+ * @enum SQFS_META_WRITER_FLAGS
*
* @brief Possible flags for @ref sqfs_meta_writer_create.
*/
@@ -65,7 +65,7 @@ typedef enum {
SQFS_META_WRITER_KEEP_IN_MEMORY = 0x01,
SQFS_META_WRITER_ALL_FLAGS = 0x01,
-} E_SQFS_META_WRITER_FLAGS;
+} SQFS_META_WRITER_FLAGS;
#ifdef __cplusplus
extern "C" {
@@ -82,7 +82,7 @@ extern "C" {
*
* @param file An output file to write the data to.
* @param cmp A compressor to use.
- * @param flags A combination of @ref E_SQFS_META_WRITER_FLAGS.
+ * @param flags A combination of @ref SQFS_META_WRITER_FLAGS.
*
* @return A pointer to a meta writer on success, NULL on allocation failure
* or if an unknown flag was set.
@@ -103,7 +103,7 @@ SQFS_API sqfs_meta_writer_t *sqfs_meta_writer_create(sqfs_file_t *file,
*
* @param m A pointer to a meta data writer.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_meta_writer_flush(sqfs_meta_writer_t *m);
@@ -121,7 +121,7 @@ SQFS_API int sqfs_meta_writer_flush(sqfs_meta_writer_t *m);
* @param data A pointer to a chunk of data to append to the writer.
* @param size The number of data bytes to append.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_meta_writer_append(sqfs_meta_writer_t *m, const void *data,
size_t size);
@@ -167,7 +167,7 @@ SQFS_API void sqfs_meta_writer_reset(sqfs_meta_writer_t *m);
* memory instead of writing them to disk, calling this function forces
* the meta writer to write out all blocks it collected so far.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_meta_write_write_to_file(sqfs_meta_writer_t *m);
@@ -184,7 +184,7 @@ SQFS_API int sqfs_meta_write_write_to_file(sqfs_meta_writer_t *m);
* @param iw A pointer to a meta data writer.
* @param n A pointer to an inode.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_meta_writer_write_inode(sqfs_meta_writer_t *iw,
const sqfs_inode_generic_t *n);
diff --git a/include/sqfs/super.h b/include/sqfs/super.h
index ea25878..d275ec1 100644
--- a/include/sqfs/super.h
+++ b/include/sqfs/super.h
@@ -76,7 +76,7 @@ struct sqfs_super_t {
/**
* @brief Identifies the compressor that has been used.
*
- * Valid identifiers are in the @ref E_SQFS_COMPRESSOR enum.
+ * Valid identifiers are in the @ref SQFS_COMPRESSOR enum.
*/
sqfs_u16 compression_id;
@@ -88,7 +88,7 @@ struct sqfs_super_t {
sqfs_u16 block_log;
/**
- * @brief A combination of @ref E_SQFS_SUPER_FLAGS flags
+ * @brief A combination of @ref SQFS_SUPER_FLAGS flags
*
* Most of the flags that can be set here are informative only.
*/
@@ -181,7 +181,7 @@ struct sqfs_super_t {
};
/**
- * @enum E_SQFS_COMPRESSOR
+ * @enum SQFS_COMPRESSOR
*
* @brief Set in @ref sqfs_super_t to identify the compresser used by the
* filesystem.
@@ -198,10 +198,10 @@ typedef enum {
SQFS_COMP_MIN = 1,
SQFS_COMP_MAX = 6,
-} E_SQFS_COMPRESSOR;
+} SQFS_COMPRESSOR;
/**
- * @enum E_SQFS_SUPER_FLAGS
+ * @enum SQFS_SUPER_FLAGS
*
* @brief Flags that can be set in @ref sqfs_super flags field.
*/
@@ -267,7 +267,7 @@ typedef enum {
* stored uncompressed.
*/
SQFS_FLAG_UNCOMPRESSED_IDS = 0x0800,
-} E_SQFS_SUPER_FLAGS;
+} SQFS_SUPER_FLAGS;
#ifdef __cplusplus
extern "C" {
@@ -283,12 +283,12 @@ extern "C" {
* @param mtime The modification time stamp to set.
* @param compressor The compressor ID to set.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value if one of the
+ * @return Zero on success, an @ref SQFS_ERROR value if one of the
* fields does not hold a valid value.
*/
SQFS_API int sqfs_super_init(sqfs_super_t *super, size_t block_size,
sqfs_u32 mtime,
- E_SQFS_COMPRESSOR compressor);
+ SQFS_COMPRESSOR compressor);
/**
* @brief Encode and write a SquashFS super block to disk.
@@ -298,7 +298,7 @@ SQFS_API int sqfs_super_init(sqfs_super_t *super, size_t block_size,
* @param super A pointer to the super block structure to write.
* @param file A file object through which to access the filesystem image.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value if one of the
+ * @return Zero on success, an @ref SQFS_ERROR value if one of the
* fields does not hold a valid value.
*/
SQFS_API int sqfs_super_write(const sqfs_super_t *super, sqfs_file_t *file);
@@ -311,7 +311,7 @@ SQFS_API int sqfs_super_write(const sqfs_super_t *super, sqfs_file_t *file);
* @param super A pointer to the super block structure to fill.
* @param file A file object through which to access the filesystem image.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value if one of the
+ * @return Zero on success, an @ref SQFS_ERROR value if one of the
* fields does not hold a valid value.
*/
SQFS_API int sqfs_super_read(sqfs_super_t *super, sqfs_file_t *file);
diff --git a/include/sqfs/table.h b/include/sqfs/table.h
index 1738789..75581c9 100644
--- a/include/sqfs/table.h
+++ b/include/sqfs/table.h
@@ -46,7 +46,7 @@ extern "C" {
* @param table_size The size of the input array in bytes.
* @param start Returns the absolute position of the location list.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_write_table(sqfs_file_t *file, sqfs_compressor_t *cmp,
const void *data, size_t table_size,
@@ -75,7 +75,7 @@ SQFS_API int sqfs_write_table(sqfs_file_t *file, sqfs_compressor_t *cmp,
* out-of-bounds read.
* @param out Returns a pointer to the table in memory.
*
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, an @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_read_table(sqfs_file_t *file, sqfs_compressor_t *cmp,
size_t table_size, sqfs_u64 location,
diff --git a/include/sqfs/xattr.h b/include/sqfs/xattr.h
index c34f920..2bbfb54 100644
--- a/include/sqfs/xattr.h
+++ b/include/sqfs/xattr.h
@@ -29,7 +29,7 @@
*/
/**
- * @enum E_SQFS_XATTR_TYPE
+ * @enum SQFS_XATTR_TYPE
*
* Used by @ref sqfs_xattr_entry_t to encodes the xattr prefix.
*/
@@ -40,7 +40,7 @@ typedef enum {
SQFS_XATTR_FLAG_OOL = 0x100,
SQFS_XATTR_PREFIX_MASK = 0xFF,
-} E_SQFS_XATTR_TYPE;
+} SQFS_XATTR_TYPE;
/**
* @struct sqfs_xattr_entry_t
@@ -54,7 +54,7 @@ struct sqfs_xattr_entry_t {
/**
* @brief Encodes the prefix of the key
*
- * A @ref E_SQFS_XATTR_TYPE value. If the @ref SQFS_XATTR_FLAG_OOL is
+ * A @ref SQFS_XATTR_TYPE value. If the @ref SQFS_XATTR_FLAG_OOL is
* set, the value that follows is not actually a string but a 64 bit
* reference to the location where the value is actually stored.
*/
@@ -158,11 +158,11 @@ extern "C" {
* Like many file systems, SquashFS stores xattrs be cutting off the common
* prefix of the key string and storing an enumerator instead to save memory.
*
- * This function takes an @ref E_SQFS_XATTR_TYPE identifier and returns the
+ * This function takes an @ref SQFS_XATTR_TYPE identifier and returns the
* coresponding prefix string, including the '.' at the end that separates
* the prefix from the rest of the key.
*/
-SQFS_API const char *sqfs_get_xattr_prefix(E_SQFS_XATTR_TYPE id);
+SQFS_API const char *sqfs_get_xattr_prefix(SQFS_XATTR_TYPE id);
/**
* @brief Resolve an xattr prefix into an identifier
@@ -173,7 +173,7 @@ SQFS_API const char *sqfs_get_xattr_prefix(E_SQFS_XATTR_TYPE id);
* This function takes a key and finds the enumerator value that represents
* its prefix. An error value is returned if the given prefix isn't supported.
*
- * @return On success an @ref E_SQFS_XATTR_TYPE. If not supported, the
+ * @return On success an @ref SQFS_XATTR_TYPE. If not supported, the
* @ref SQFS_ERROR_UNSUPPORTED error code.
*/
SQFS_API int sqfs_get_xattr_prefix_id(const char *key);
diff --git a/include/sqfs/xattr_reader.h b/include/sqfs/xattr_reader.h
index 54ffc12..8294bd8 100644
--- a/include/sqfs/xattr_reader.h
+++ b/include/sqfs/xattr_reader.h
@@ -105,7 +105,7 @@ SQFS_API sqfs_xattr_reader_t *sqfs_xattr_reader_create(sqfs_u32 flags);
* @param cmp A pointer to a compressor used to uncompress the loaded meta data
* blocks.
*
- * @return Zero on success, a negative @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a negative @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_xattr_reader_load(sqfs_xattr_reader_t *xr,
const sqfs_super_t *super,
@@ -124,7 +124,7 @@ SQFS_API int sqfs_xattr_reader_load(sqfs_xattr_reader_t *xr,
* @param idx The xattr index to resolve
* @param desc Used to return the description
*
- * @return Zero on success, a negative @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a negative @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_xattr_reader_get_desc(sqfs_xattr_reader_t *xr, sqfs_u32 idx,
sqfs_xattr_id_t *desc);
@@ -142,7 +142,7 @@ SQFS_API int sqfs_xattr_reader_get_desc(sqfs_xattr_reader_t *xr, sqfs_u32 idx,
* @param xr A pointer to an xattr reader instance
* @param desc The descriptor holding the location of the key-value pairs
*
- * @return Zero on success, a negative @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a negative @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_xattr_reader_seek_kv(sqfs_xattr_reader_t *xr,
const sqfs_xattr_id_t *desc);
@@ -162,7 +162,7 @@ SQFS_API int sqfs_xattr_reader_seek_kv(sqfs_xattr_reader_t *xr,
* @param key_out Used to return the decoded key. The underlying memory can be
* released using a single free() call.
*
- * @return Zero on success, a negative @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a negative @ref SQFS_ERROR value on failure.
*/
SQFS_API
int sqfs_xattr_reader_read_key(sqfs_xattr_reader_t *xr,
@@ -183,7 +183,7 @@ int sqfs_xattr_reader_read_key(sqfs_xattr_reader_t *xr,
* @param val_out Used to return the decoded value. The underlying memory can
* be released using a single free() call.
*
- * @return Zero on success, a negative @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a negative @ref SQFS_ERROR value on failure.
*/
SQFS_API
int sqfs_xattr_reader_read_value(sqfs_xattr_reader_t *xr,
diff --git a/include/sqfs/xattr_writer.h b/include/sqfs/xattr_writer.h
index b25215e..21c5179 100644
--- a/include/sqfs/xattr_writer.h
+++ b/include/sqfs/xattr_writer.h
@@ -75,7 +75,7 @@ SQFS_API sqfs_xattr_writer_t *sqfs_xattr_writer_create(void);
*
* @param xwr A pointer to an xattr writer instance.
*
- * @return Zero on success, a negative @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a negative @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_xattr_writer_begin(sqfs_xattr_writer_t *xwr);
@@ -89,7 +89,7 @@ SQFS_API int sqfs_xattr_writer_begin(sqfs_xattr_writer_t *xwr);
* @param value The associated value to store.
* @param size The size of the value blob.
*
- * @return Zero on success, a negative @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a negative @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_xattr_writer_add(sqfs_xattr_writer_t *xwr, const char *key,
const void *value, size_t size);
@@ -108,7 +108,7 @@ SQFS_API int sqfs_xattr_writer_add(sqfs_xattr_writer_t *xwr, const char *key,
* @param out Returns an ID that has to be set to the inode that the block of
* key-value pairs belongs to.
*
- * @return Zero on success, a negative @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a negative @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_xattr_writer_end(sqfs_xattr_writer_t *xwr, sqfs_u32 *out);
@@ -127,7 +127,7 @@ SQFS_API int sqfs_xattr_writer_end(sqfs_xattr_writer_t *xwr, sqfs_u32 *out);
* @param super The super block to update with the table locations and flags.
* @param cmp The compressor to user to compress the tables.
*
- * @return Zero on success, a negative @ref E_SQFS_ERROR value on failure.
+ * @return Zero on success, a negative @ref SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_xattr_writer_flush(sqfs_xattr_writer_t *xwr,
sqfs_file_t *file, sqfs_super_t *super,
diff --git a/lib/common/comp_opt.c b/lib/common/comp_opt.c
index 66d562e..58a7a21 100644
--- a/lib/common/comp_opt.c
+++ b/lib/common/comp_opt.c
@@ -89,7 +89,7 @@ static char *const token[] = {
};
int compressor_cfg_init_options(sqfs_compressor_config_t *cfg,
- E_SQFS_COMPRESSOR id,
+ SQFS_COMPRESSOR id,
size_t block_size, char *options)
{
size_t num_flags = 0, min_level = 0, max_level = 0, level, dict_size;
@@ -332,7 +332,7 @@ static const compressor_help_fun_t helpfuns[SQFS_COMP_MAX + 1] = {
[SQFS_COMP_ZSTD] = zstd_print_help,
};
-void compressor_print_help(E_SQFS_COMPRESSOR id)
+void compressor_print_help(SQFS_COMPRESSOR id)
{
if (id < SQFS_COMP_MIN || id > SQFS_COMP_MAX)
return;
diff --git a/lib/common/compress.c b/lib/common/compress.c
index a2f53c2..3ee242d 100644
--- a/lib/common/compress.c
+++ b/lib/common/compress.c
@@ -6,7 +6,7 @@
*/
#include "common.h"
-E_SQFS_COMPRESSOR compressor_get_default(void)
+SQFS_COMPRESSOR compressor_get_default(void)
{
if (sqfs_compressor_exists(SQFS_COMP_XZ))
return SQFS_COMP_XZ;
diff --git a/lib/sqfs/comp/compressor.c b/lib/sqfs/comp/compressor.c
index 0b4bf25..28de2c5 100644
--- a/lib/sqfs/comp/compressor.c
+++ b/lib/sqfs/comp/compressor.c
@@ -73,7 +73,7 @@ int sqfs_generic_read_options(sqfs_file_t *file, void *data, size_t size)
return 0;
}
-bool sqfs_compressor_exists(E_SQFS_COMPRESSOR id)
+bool sqfs_compressor_exists(SQFS_COMPRESSOR id)
{
if (id < SQFS_COMP_MIN || id > SQFS_COMP_MAX)
return false;
@@ -122,7 +122,7 @@ sqfs_compressor_t *sqfs_compressor_create(const sqfs_compressor_config_t *cfg)
return compressors[cfg->id](cfg);
}
-const char *sqfs_compressor_name_from_id(E_SQFS_COMPRESSOR id)
+const char *sqfs_compressor_name_from_id(SQFS_COMPRESSOR id)
{
if (id < 0 || (size_t)id >= sizeof(names) / sizeof(names[0]))
return NULL;
@@ -143,7 +143,7 @@ int sqfs_compressor_id_from_name(const char *name)
}
int sqfs_compressor_config_init(sqfs_compressor_config_t *cfg,
- E_SQFS_COMPRESSOR id,
+ SQFS_COMPRESSOR id,
size_t block_size, sqfs_u16 flags)
{
sqfs_u32 flag_mask = SQFS_COMP_FLAG_GENERIC_ALL;
diff --git a/lib/sqfs/super.c b/lib/sqfs/super.c
index 4ed95ae..c5b6fe9 100644
--- a/lib/sqfs/super.c
+++ b/lib/sqfs/super.c
@@ -13,7 +13,7 @@
#include <string.h>
int sqfs_super_init(sqfs_super_t *super, size_t block_size, sqfs_u32 mtime,
- E_SQFS_COMPRESSOR compressor)
+ SQFS_COMPRESSOR compressor)
{
unsigned int i;
diff --git a/lib/sqfs/xattr.c b/lib/sqfs/xattr.c
index 909a9a5..29ecebf 100644
--- a/lib/sqfs/xattr.c
+++ b/lib/sqfs/xattr.c
@@ -13,7 +13,7 @@
static const struct {
const char *prefix;
- E_SQFS_XATTR_TYPE type;
+ SQFS_XATTR_TYPE type;
} xattr_types[] = {
{ "user.", SQFS_XATTR_USER },
{ "trusted.", SQFS_XATTR_TRUSTED },
@@ -36,7 +36,7 @@ int sqfs_get_xattr_prefix_id(const char *key)
return SQFS_ERROR_UNSUPPORTED;
}
-const char *sqfs_get_xattr_prefix(E_SQFS_XATTR_TYPE id)
+const char *sqfs_get_xattr_prefix(SQFS_XATTR_TYPE id)
{
size_t i;