diff options
Diffstat (limited to 'ubifs-utils/common')
-rw-r--r-- | ubifs-utils/common/defs.h | 4 | ||||
-rw-r--r-- | ubifs-utils/common/ubifs.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ubifs-utils/common/defs.h b/ubifs-utils/common/defs.h index 3dafc6d..cafc94a 100644 --- a/ubifs-utils/common/defs.h +++ b/ubifs-utils/common/defs.h @@ -23,9 +23,7 @@ extern struct ubifs_info info_; enum { MKFS_PROGRAM_TYPE = 0 }; -extern int debug_level; - -#define dbg_msg(lvl, fmt, ...) do {if (debug_level >= lvl) \ +#define dbg_msg(lvl, fmt, ...) do {if (info_.debug_level >= lvl) \ printf("%s: %s: " fmt "\n", PROGRAM_NAME, __FUNCTION__, ##__VA_ARGS__); \ } while(0) diff --git a/ubifs-utils/common/ubifs.h b/ubifs-utils/common/ubifs.h index 2b0ffe5..58aaba9 100644 --- a/ubifs-utils/common/ubifs.h +++ b/ubifs-utils/common/ubifs.h @@ -273,6 +273,8 @@ struct ubifs_znode * @highest_inum: highest used inode number * @max_sqnum: current global sequence number * + * @debug_level: level of debug messages, 0 - none, 1 - statistics, + * 2 - files, 3 - more details * @program_type: used to identify the type of current program * @program_name: program name * @@ -363,6 +365,7 @@ struct ubifs_info ino_t highest_inum; unsigned long long max_sqnum; + int debug_level; int program_type; const char *program_name; |