From b5b1f08369222394540fb4b3b947fe26a2557d1d Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 7 Sep 2018 14:36:41 +0200 Subject: ubifs: Create hash for default LPT During creation of the default filesystem on an empty flash the default LPT is created. With this patch a hash over the default LPT is calculated which can be added to the default filesystems master node. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger --- fs/ubifs/sb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/ubifs/sb.c') diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index 7e08c8143316..572756579532 100644 --- a/fs/ubifs/sb.c +++ b/fs/ubifs/sb.c @@ -87,6 +87,7 @@ static int create_default_filesystem(struct ubifs_info *c) __le64 tmp_le64; __le32 tmp_le32; struct timespec64 ts; + u8 hash_lpt[UBIFS_HASH_ARR_SZ]; /* Some functions called from here depend on the @c->key_len filed */ c->key_len = UBIFS_SK_LEN; @@ -148,7 +149,7 @@ static int create_default_filesystem(struct ubifs_info *c) c->lsave_cnt = DEFAULT_LSAVE_CNT; c->max_leb_cnt = c->leb_cnt; err = ubifs_create_dflt_lpt(c, &main_lebs, lpt_first, &lpt_lebs, - &big_lpt); + &big_lpt, hash_lpt); if (err) return err; -- cgit v1.2.3