diff mbox series

[2/2] mkfs.ubifs: Store compr_size in correct endianness.

Message ID 20181107202108.13734-2-richard@nod.at
State Accepted
Delegated to: David Oberhollenzer
Headers show
Series None | expand

Commit Message

Richard Weinberger Nov. 7, 2018, 8:21 p.m. UTC
compr_size has to be in LE16.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 ubifs-utils/mkfs.ubifs/fscrypt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heiko Schocher Nov. 8, 2018, 5:28 a.m. UTC | #1
Hello Richard,

Am 07.11.2018 um 21:21 schrieb Richard Weinberger:
> compr_size has to be in LE16.
> 
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
>   ubifs-utils/mkfs.ubifs/fscrypt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Thanks! Fixes my problems with encryption on imx6 based board.

Tested-by: Heiko Schocher <hsdenx.de>

bye,
Heiko
David Oberhollenzer Nov. 9, 2018, 1:38 p.m. UTC | #2
Applied to mtd-utils.git master.

Thanks,

David
diff mbox series

Patch

diff --git a/ubifs-utils/mkfs.ubifs/fscrypt.c b/ubifs-utils/mkfs.ubifs/fscrypt.c
index 6d2b650d626d..118c11c5a4ca 100644
--- a/ubifs-utils/mkfs.ubifs/fscrypt.c
+++ b/ubifs-utils/mkfs.ubifs/fscrypt.c
@@ -125,7 +125,7 @@  int encrypt_data_node(struct fscrypt_context *fctx, unsigned int block_no,
 	void *inbuf, *outbuf, *crypt_key;
 	size_t ret, pad_len = round_up(length, FS_CRYPTO_BLOCK_SIZE);
 
-	dn->compr_size = length;
+	dn->compr_size = cpu_to_le16(length);
 
 	inbuf = xzalloc(pad_len);
 	outbuf = xzalloc(pad_len);