From 03ec75b9e6ad4cb372f86d1581c2b1b2ef987c72 Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 11 Nov 2024 16:36:33 +0800 Subject: ubifs-utils: Decouple mkfs.ubifs.h out of other modules Header file mkfs.ubifs.h is included in other modules(eg. compr.c, lpt.c, fscrypt.h, sign.c), decouple it out of other modules. There are two parts in mkfs.ubifs.h: 1. common functions, for example dbg_msg, err_msg and write_leb, move these functions into common/defs.h and common/ubifs.h. 2. devtable related definations, move them into a new header file common/devtable.h. Splitting common functions from mkfs.ubifs.h is also a preparation for importing libubifs(from linux kernel) to replace current UBIFS libs. Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- ubifs-utils/common/lpt.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ubifs-utils/common/lpt.c') diff --git a/ubifs-utils/common/lpt.c b/ubifs-utils/common/lpt.c index 7ee739a..23ffe7f 100644 --- a/ubifs-utils/common/lpt.c +++ b/ubifs-utils/common/lpt.c @@ -20,12 +20,18 @@ * Artem Bityutskiy */ -#include "mkfs.ubifs.h" - #ifdef WITH_CRYPTO #include #endif +#define PROGRAM_NAME "mkfs.ubifs" +#include "common.h" +#include "lpt.h" +#include "defs.h" +#include "ubifs.h" +#include "crc16.h" +#include "sign.h" + /** * do_calc_lpt_geom - calculate sizes for the LPT area. * @c: the UBIFS file-system description object -- cgit v1.2.3