diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-27 18:15:40 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-27 18:15:40 +0200 |
commit | 40232f4bd4d7e8e001f7d1e8f120606f59b2c147 (patch) | |
tree | 5d763f4f22a487fd2e669efe0970615096f1f5fd /include/sqfs/xattr.h | |
parent | f6904a98bffe0bce5fc6aac408c141a25c0e05ab (diff) |
Cleanup: replace fixed with data types with typedefs
This is a fully automated search and replace, i.e. I ran this:
git grep -l uint8_t | xargs sed -i 's/uint8_t/sqfs_u8/g'
git grep -l uint16_t | xargs sed -i 's/uint16_t/sqfs_u16/g'
git grep -l uint32_t | xargs sed -i 's/uint32_t/sqfs_u32/g'
git grep -l uint64_t | xargs sed -i 's/uint64_t/sqfs_u64/g'
git grep -l int8_t | xargs sed -i 's/int8_t/sqfs_s8/g'
git grep -l int16_t | xargs sed -i 's/int16_t/sqfs_s16/g'
git grep -l int32_t | xargs sed -i 's/int32_t/sqfs_s32/g'
git grep -l int64_t | xargs sed -i 's/int64_t/sqfs_s64/g'
and than added the appropriate definitions to sqfs/predef.h
The whole point being better compatibillity with platforms that may
not have an stdint.h with the propper definitions.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs/xattr.h')
-rw-r--r-- | include/sqfs/xattr.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/include/sqfs/xattr.h b/include/sqfs/xattr.h index 71e4ffa..e4a3efa 100644 --- a/include/sqfs/xattr.h +++ b/include/sqfs/xattr.h @@ -59,13 +59,13 @@ struct sqfs_xattr_entry_t { * set, the value that follows is not actually a string but a 64 bit * reference to the location where the value is actually stored. */ - uint16_t type; + sqfs_u16 type; /** * @brief The size in bytes of the suffix string that follows */ - uint16_t size; - uint8_t key[]; + sqfs_u16 size; + sqfs_u8 key[]; }; /** @@ -80,8 +80,8 @@ struct sqfs_xattr_value_t { /** * @brief The exact size in bytes of the value that follows */ - uint32_t size; - uint8_t value[]; + sqfs_u32 size; + sqfs_u8 value[]; }; /** @@ -102,18 +102,18 @@ struct sqfs_xattr_id_t { * pair. The lower 16 bits store an offset into the uncompressed meta * data block. */ - uint64_t xattr; + sqfs_u64 xattr; /** * @brief Number of consecutive key-value pairs */ - uint32_t count; + sqfs_u32 count; /** * @brief Total size of the uncompressed key-value pairs in bytes, * including data structures used to encode them. */ - uint32_t size; + sqfs_u32 size; }; /** @@ -130,23 +130,23 @@ struct sqfs_xattr_id_table_t { * @brief The location of the first meta data block holding the key * value pairs. */ - uint64_t xattr_table_start; + sqfs_u64 xattr_table_start; /** * @brief The total number of descriptors (@ref sqfs_xattr_id_t) */ - uint32_t xattr_ids; + sqfs_u32 xattr_ids; /** * @brief Unused, alwayas set this to 0 when writing! */ - uint32_t unused; + sqfs_u32 unused; /** * @brief Holds the locations of the meta data blocks that contain the * @ref sqfs_xattr_id_t descriptor array. */ - uint64_t locations[]; + sqfs_u64 locations[]; }; /** @@ -298,7 +298,7 @@ SQFS_API sqfs_xattr_reader_t *sqfs_xattr_reader_create(sqfs_file_t *file, * * @return Zero on success, a negative @ref E_SQFS_ERROR value on failure. */ -SQFS_API int sqfs_xattr_reader_get_desc(sqfs_xattr_reader_t *xr, uint32_t idx, +SQFS_API int sqfs_xattr_reader_get_desc(sqfs_xattr_reader_t *xr, sqfs_u32 idx, sqfs_xattr_id_t *desc); /** |