summaryrefslogtreecommitdiff
path: root/ubifs-utils/common/fscrypt.c
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2024-11-11 16:36:42 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-11-11 10:32:45 +0100
commit583125d58cc604ba8bb3cdca1656c7f973fae69c (patch)
tree3e203e2b8f6b78fc88ac20c2271a796ed38fdc46 /ubifs-utils/common/fscrypt.c
parent50f9259befe1b94ee991ae390b7c84b21f4dbb88 (diff)
ubifs-utils: Add linux type definitions
Add linux type definitions, because there are many types (eg. u8/u16/u64) used in UBIFS linux kernel libs. Besides move type conversions (eg. cpu_to_le16, cpu_to_le32, etc.) into type definitions header file. 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.c')
-rw-r--r--ubifs-utils/common/fscrypt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ubifs-utils/common/fscrypt.c b/ubifs-utils/common/fscrypt.c
index 895d5c7..f39faa7 100644
--- a/ubifs-utils/common/fscrypt.c
+++ b/ubifs-utils/common/fscrypt.c
@@ -20,6 +20,7 @@
#include <endian.h>
+#include "linux_types.h"
#include "fscrypt.h"
#include "defs.h"
#include "ubifs.h"
@@ -88,7 +89,7 @@ unsigned int fscrypt_fname_encrypted_size(struct fscrypt_context *fctx,
return round_up(ilen, padding);
}
-int encrypt_path(void **outbuf, void *data, unsigned int data_len,
+int encrypt_path(void **outbuf, const void *data, unsigned int data_len,
unsigned int max_namelen, struct fscrypt_context *fctx)
{
void *inbuf, *crypt_key;