summaryrefslogtreecommitdiff
path: root/ubifs-utils/common/defs.h
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2024-11-11 16:36:52 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-11-11 10:32:45 +0100
commit008d2cad386862ce0f0abb20df291a3d29313b96 (patch)
tree8795078791faeb1df83eccef82a0bff1008d04ed /ubifs-utils/common/defs.h
parent24f4d8abd9fc7f8e90c0f1d2a652cb8ea790d54c (diff)
ubifs-utils: Add linux hexdump implementations lib
Add linux hexdump implementations lib, because function print_hex_dump() is used in UBIFS linux kernel libs. This is a preparation for replacing implementation of UBIFS utils with linux kernel 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/defs.h')
-rw-r--r--ubifs-utils/common/defs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ubifs-utils/common/defs.h b/ubifs-utils/common/defs.h
index 6d99a2f..548d9df 100644
--- a/ubifs-utils/common/defs.h
+++ b/ubifs-utils/common/defs.h
@@ -26,6 +26,12 @@ enum { MKFS_PROGRAM_TYPE = 0 };
enum { ERR_LEVEL = 1, WARN_LEVEL, INFO_LEVEL, DEBUG_LEVEL };
+enum {
+ DUMP_PREFIX_NONE,
+ DUMP_PREFIX_ADDRESS,
+ DUMP_PREFIX_OFFSET
+};
+
#define pr_debug(fmt, ...) do { if (info_.debug_level >= DEBUG_LEVEL) \
printf("<DEBUG> %s[%d] (%s): %s: " fmt, PROGRAM_NAME, getpid(), \
info_.dev_name, __FUNCTION__, ##__VA_ARGS__); \