summaryrefslogtreecommitdiff
path: root/difftool/node_compare.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-07 10:51:03 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-07 11:24:37 +0200
commit28a99ec109637a92f78a24f0eed64cb8a078f356 (patch)
treef13ef1b54177c4cd779b5f5bee65bd27b7ef82db /difftool/node_compare.c
parent740b161bfaddbd236c9d052546f27dd4af30582c (diff)
Add flag to sqfsdiff to compare inode numbers
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'difftool/node_compare.c')
-rw-r--r--difftool/node_compare.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/difftool/node_compare.c b/difftool/node_compare.c
index e1b72c6..2e1cec6 100644
--- a/difftool/node_compare.c
+++ b/difftool/node_compare.c
@@ -43,6 +43,14 @@ int node_compare(tree_node_t *a, tree_node_t *b)
}
}
+ if (compare_flags & COMPARE_INODE_NUM) {
+ if (a->inode_num != b->inode_num) {
+ fprintf(stdout, "%s has a different inode number\n",
+ path);
+ status = 1;
+ }
+ }
+
switch (a->mode & S_IFMT) {
case S_IFSOCK:
case S_IFIFO: