diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2024-11-11 16:36:41 +0800 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2024-11-11 10:32:45 +0100 |
commit | 50f9259befe1b94ee991ae390b7c84b21f4dbb88 (patch) | |
tree | fe5f75bc73ca5c241a158d8e4c9ec9519652e382 /ubifs-utils/common/fscrypt.h | |
parent | 898499314c7073bbf6851db6542858921aeb6580 (diff) |
ubifs-utils: Add compiler attributes implementations
Add compiler attributes implementations, such as __packed, __unused,
__const, etc., which could be used in linux kernel libs. Besides, change
some existing attributes into linux kernel style.
This is a preparation for replacing implementation of UBIFS utils with
linux kernel libs.
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/common/fscrypt.h')
-rw-r--r-- | ubifs-utils/common/fscrypt.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ubifs-utils/common/fscrypt.h b/ubifs-utils/common/fscrypt.h index 908a504..b8a599d 100644 --- a/ubifs-utils/common/fscrypt.h +++ b/ubifs-utils/common/fscrypt.h @@ -25,6 +25,8 @@ #include <openssl/rand.h> #endif #include <assert.h> + +#include "compiler_attributes.h" #include "ubifs.h" #include "crypto.h" @@ -79,7 +81,7 @@ struct fscrypt_context { __u8 flags; __u8 master_key_descriptor[FS_KEY_DESCRIPTOR_SIZE]; __u8 nonce[FS_KEY_DERIVATION_NONCE_SIZE]; -} __attribute__((packed)); +} __packed; /** * For encrypted symlinks, the ciphertext length is stored at the beginning @@ -88,7 +90,7 @@ struct fscrypt_context { struct fscrypt_symlink_data { __le16 len; char encrypted_path[1]; -} __attribute__((packed)); +} __packed; #ifndef FS_MAX_KEY_SIZE |