aboutsummaryrefslogtreecommitdiff
path: root/ubifs-utils/common/defs.h
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2024-11-11 17:01:00 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-11-11 10:32:45 +0100
commit665c44e7c9135a58847ab0773fc7977929d1497c (patch)
treeb66859f364d9bafc2d9bd0d19c5d4a42cf72e8c4 /ubifs-utils/common/defs.h
parent2ac2e90cca9528147969d21378f8a736db710e35 (diff)
ubifs-utils: Replace ubifs related source code with linux kernel implementation
Replace ubifs related source code with the implementation of linux kernel. It makes userspace implementation be same with linux kernel, then fsck.ubifs can resuse the code. Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/common/defs.h')
-rw-r--r--ubifs-utils/common/defs.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/ubifs-utils/common/defs.h b/ubifs-utils/common/defs.h
index ac46d83..db32ea4 100644
--- a/ubifs-utils/common/defs.h
+++ b/ubifs-utils/common/defs.h
@@ -15,7 +15,6 @@
#include <assert.h>
#include <execinfo.h>
-#include "linux_types.h"
#include "ubifs.h"
/* common.h requires the PROGRAM_NAME macro */
@@ -27,8 +26,6 @@ extern struct ubifs_info info_;
enum { MKFS_PROGRAM_TYPE = 0 };
-enum { ERR_LEVEL = 1, WARN_LEVEL, INFO_LEVEL, DEBUG_LEVEL };
-
enum {
DUMP_PREFIX_NONE,
DUMP_PREFIX_ADDRESS,
@@ -114,12 +111,6 @@ static inline u64 div_u64(u64 dividend, u32 divisor)
return dividend / divisor;
}
-#define do_div(n,base) ({ \
-int __res; \
-__res = ((unsigned long) n) % (unsigned) base; \
-n = ((unsigned long) n) / (unsigned) base; \
-__res; })
-
#if INT_MAX != 0x7fffffff
#error : sizeof(int) must be 4 for this program
#endif