aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/meta_reader.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-11 01:24:57 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-11 01:47:18 +0200
commit5038c4b33ea403203b8edd82b44a8db06464409b (patch)
treeb0d8b380601694f47a6dd45f4c6313fc7d9f0937 /lib/sqfs/meta_reader.c
parentb45eead4dfd6e820b4c1634ae72398bf717193f9 (diff)
Major cleanup of mkfs block processor
This commit tries to make the block and fragment processing code a lot more readable by simplifying it as follows. The following pattern is used repeatedly: - Try to compress a block - Write the compressed if smaller (the original otherwise) to a file - Print errors on the way - Set the magic (1 << 24) flag if we wrote the original - Increment the super block byte counter => Move that to a seperate function called "write_compressed" => Move the code to grow the fragment table is moved to a seperate function. => Clearing the fragment buffer is pointless, so remove that The add_fragment/add_block functions are now trivial => Merge them into process_file => Global block counter no longer needed, so remove that too Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/meta_reader.c')
0 files changed, 0 insertions, 0 deletions