From 63d20acc274acfb7eadc23a9d87bce5497fda8bb Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 11 Nov 2024 17:01:18 +0800 Subject: fsck.ubifs: rebuild_fs: Build LPT This is the 10/12 step of rebuilding. All LEBs' properties can be calculated in previous steps according to all nodes' position, then construct LPT just like mkfs does, and write LPT on flash. Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- ubifs-utils/libubifs/ubifs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ubifs-utils/libubifs') diff --git a/ubifs-utils/libubifs/ubifs.h b/ubifs-utils/libubifs/ubifs.h index c9d582d..6f96555 100644 --- a/ubifs-utils/libubifs/ubifs.h +++ b/ubifs-utils/libubifs/ubifs.h @@ -338,6 +338,7 @@ enum { * @flags: LEB properties flags (see above) * @lnum: LEB number * @end: the end postition of LEB calculated by the last node + * @used: amount of used space in bytes * @list: list of same-category lprops (for LPROPS_EMPTY and LPROPS_FREEABLE) * @hpos: heap position in heap of same-category lprops (other categories) */ @@ -347,6 +348,7 @@ struct ubifs_lprops { int flags; int lnum; int end; + int used; union { struct list_head list; int hpos; -- cgit v1.2.3