aboutsummaryrefslogtreecommitdiff
path: root/ubifs-utils/common/ubifs.h
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2024-11-11 16:36:34 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-11-11 10:32:45 +0100
commitbc85302b02f8a1af351d05050f9de8a54c68ba09 (patch)
treee1437e4509aa7184ca76e9db2213e2630b3965e6 /ubifs-utils/common/ubifs.h
parent03ec75b9e6ad4cb372f86d1581c2b1b2ef987c72 (diff)
ubifs-utils: Define PROGRAM_NAME as variable
PROGRAM_NAME is defined as a const string "mkfs.ubifs", which won't be suitable for fsck.ubifs. Add 'program_name' member in ubifs_info structure, define PROGRAM_NAME as ubifs_info.program_name. Then, error messages will display right program name if fsck.ubifs is supported. Besides, add 'program_type' member in ubifs_info structure to identify which current program type is, without comparing program name. 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ubifs-utils/common/ubifs.h b/ubifs-utils/common/ubifs.h
index 0eef31a..2b0ffe5 100644
--- a/ubifs-utils/common/ubifs.h
+++ b/ubifs-utils/common/ubifs.h
@@ -273,6 +273,9 @@ struct ubifs_znode
* @highest_inum: highest used inode number
* @max_sqnum: current global sequence number
*
+ * @program_type: used to identify the type of current program
+ * @program_name: program name
+ *
* @jhead_cnt: count of journal heads
* @max_bud_bytes: maximum number of bytes allowed in buds
*
@@ -360,6 +363,9 @@ struct ubifs_info
ino_t highest_inum;
unsigned long long max_sqnum;
+ int program_type;
+ const char *program_name;
+
int jhead_cnt;
long long max_bud_bytes;