diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-22 01:48:50 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-22 02:13:06 +0200 |
commit | 57b6a4c855120bc721cd4e76cca32c7b1a382407 (patch) | |
tree | 0ee339243e0062cd5543324383e921cfa5273be2 /lib/sqfshelper/data_reader_dump.c | |
parent | 1bf363ba52025a0cf504b313878ea99c174a1683 (diff) |
Add helper functions for working with inodes
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfshelper/data_reader_dump.c')
-rw-r--r-- | lib/sqfshelper/data_reader_dump.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/sqfshelper/data_reader_dump.c b/lib/sqfshelper/data_reader_dump.c index e28bf20..a9b6bb9 100644 --- a/lib/sqfshelper/data_reader_dump.c +++ b/lib/sqfshelper/data_reader_dump.c @@ -25,11 +25,7 @@ int sqfs_data_reader_dump(sqfs_data_reader_t *data, size_t i, diff; int err; - if (inode->base.type == SQFS_INODE_EXT_FILE) { - filesz = inode->data.file_ext.file_size; - } else { - filesz = inode->data.file.file_size; - } + sqfs_inode_get_file_size(inode, &filesz); if (allow_sparse && ftruncate(outfd, filesz)) goto fail_sparse; |