diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2024-11-11 16:36:33 +0800 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2024-11-11 10:32:45 +0100 |
commit | 03ec75b9e6ad4cb372f86d1581c2b1b2ef987c72 (patch) | |
tree | 4d5e45faa1772cbb5b07e5dc0a78a4398de11d11 /ubifs-utils/common/ubifs.h | |
parent | e7e19cd9d8cc0f54ca463c4aebf7c4ef5e4f84f8 (diff) |
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 <chengzhihao1@huawei.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/common/ubifs.h')
-rw-r--r-- | ubifs-utils/common/ubifs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ubifs-utils/common/ubifs.h b/ubifs-utils/common/ubifs.h index 55937ce..0eef31a 100644 --- a/ubifs-utils/common/ubifs.h +++ b/ubifs-utils/common/ubifs.h @@ -25,6 +25,9 @@ #ifndef __UBIFS_H__ #define __UBIFS_H__ +#include <mtd/ubifs-media.h> +#include "libubi.h" + /* Maximum logical eraseblock size in bytes */ #define UBIFS_MAX_LEB_SZ (2*1024*1024) @@ -468,4 +471,6 @@ struct ubifs_branch *ubifs_idx_branch(const struct ubifs_info *c, (UBIFS_BRANCH_SZ + c->key_len + c->hash_len) * bnum); } +int write_leb(int lnum, int len, void *buf); + #endif /* __UBIFS_H__ */ |