aboutsummaryrefslogtreecommitdiff
path: root/difftool
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-22 01:48:50 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-22 02:13:06 +0200
commit57b6a4c855120bc721cd4e76cca32c7b1a382407 (patch)
tree0ee339243e0062cd5543324383e921cfa5273be2 /difftool
parent1bf363ba52025a0cf504b313878ea99c174a1683 (diff)
Add helper functions for working with inodes
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'difftool')
-rw-r--r--difftool/compare_files.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/difftool/compare_files.c b/difftool/compare_files.c
index a977d95..aa11f43 100644
--- a/difftool/compare_files.c
+++ b/difftool/compare_files.c
@@ -33,17 +33,8 @@ int compare_files(sqfsdiff_t *sd, const sqfs_inode_generic_t *old,
uint64_t offset, diff, oldsz, newsz;
int status = 0, ret;
- if (old->base.type == SQFS_INODE_EXT_FILE) {
- oldsz = old->data.file_ext.file_size;
- } else {
- oldsz = old->data.file.file_size;
- }
-
- if (new->base.type == SQFS_INODE_EXT_FILE) {
- newsz = new->data.file_ext.file_size;
- } else {
- newsz = new->data.file.file_size;
- }
+ sqfs_inode_get_file_size(old, &oldsz);
+ sqfs_inode_get_file_size(new, &newsz);
if (oldsz != newsz)
goto out_different;