diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-02-23 03:44:33 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-02-23 04:02:49 +0100 |
commit | c924d87a4cbbeb93825f34f997add1ca4573a368 (patch) | |
tree | a2497b2954e0f6538cfa669062ab409f16518fc7 /extras/mknastyfs.c | |
parent | 7350bebc4ceee0bf065e73f392edb725f8d0cd14 (diff) |
Unify the payload counters in the sqfs_inode_generic_t
Instead of having seperate counters for blocks, dir index bytes
and having to fiddle out the link target size, simply use a single
value that stores the number of payload bytes used.
A seperate "payload bytes available" is used for dynamically
growing inodes during processing.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'extras/mknastyfs.c')
-rw-r--r-- | extras/mknastyfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extras/mknastyfs.c b/extras/mknastyfs.c index b11f8f9..7ec3ee0 100644 --- a/extras/mknastyfs.c +++ b/extras/mknastyfs.c @@ -37,7 +37,8 @@ static sqfs_inode_generic_t *create_file_inode(sqfs_id_table_t *idtbl, inode->data.file.file_size = 1337; inode->data.file.fragment_index = 0xFFFFFFFF; - inode->num_file_blocks = 1; + inode->payload_bytes_used = sizeof(sqfs_u32); + inode->payload_bytes_available = sizeof(sqfs_u32); inode->extra[0] = (1 << 24) | inode->data.file.file_size; return inode; } |