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/Makemodule.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ubifs-utils/Makemodule.am') diff --git a/ubifs-utils/Makemodule.am b/ubifs-utils/Makemodule.am index 4a617c1..8af65be 100644 --- a/ubifs-utils/Makemodule.am +++ b/ubifs-utils/Makemodule.am @@ -9,6 +9,7 @@ common_SOURCES = \ ubifs-utils/common/hashtable/hashtable_private.h \ ubifs-utils/common/hashtable/hashtable.c \ ubifs-utils/common/hashtable/hashtable_itr.c \ + ubifs-utils/common/devtable.h \ ubifs-utils/common/devtable.c \ ubifs-utils/common/ubifs.h \ ubifs-utils/common/key.h \ @@ -27,12 +28,11 @@ endif mkfs_ubifs_SOURCES = \ $(common_SOURCES) \ - ubifs-utils/mkfs.ubifs/mkfs.ubifs.h \ ubifs-utils/mkfs.ubifs/mkfs.ubifs.c mkfs_ubifs_LDADD = libmtd.a libubi.a $(ZLIB_LIBS) $(LZO_LIBS) $(ZSTD_LIBS) $(UUID_LIBS) $(LIBSELINUX_LIBS) $(OPENSSL_LIBS) -lm mkfs_ubifs_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) $(ZSTD_CFLAGS) $(UUID_CFLAGS) $(LIBSELINUX_CFLAGS) \ - -I$(top_srcdir)/ubi-utils/include -I$(top_srcdir)/ubifs-utils/mkfs.ubifs/ -I$(top_srcdir)/ubifs-utils/common + -I$(top_srcdir)/ubi-utils/include -I$(top_srcdir)/ubifs-utils/common EXTRA_DIST += ubifs-utils/common/README -- cgit v1.2.3