aboutsummaryrefslogtreecommitdiff
path: root/tests/add_by_path.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-28 12:41:26 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-28 15:07:34 +0200
commit4e017928c7b5b590d2c7e04e42cb497eb3a4f8cf (patch)
tree28f649af1074ab74576a9a715991c610b210f1c0 /tests/add_by_path.c
parentd89d7e3d7f5b21fe53ea0cbf65134bdc3df30950 (diff)
Add support for packing sparse files
This commit adds support for packing sparse files into squashfs images as follows: - In the data writer: simply detect zero blocks and write a zero to the block size field and don't emit any data. Record the number of bytes saved this way. For fragments, set the fragment offset to invalid. - In the inode writer: write out the number of bytes saved for sparse files. If there should be a fragment but there is none, append a block count of 0. - In the data reader: if the block size is 0, read nothing from disk and emit an empty block. Do the same if the fragment is missing. - In the inode reader: restore the number of bytes saved for sparse files. The sparse files can be packed and unpacked, but the unpacking will not create sparse files for now. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/add_by_path.c')
0 files changed, 0 insertions, 0 deletions