diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2024-09-26 11:47:24 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2024-09-26 11:47:24 +0200 |
commit | e9d1d3dc9aa4b53be536f97f253cc908e58429ec (patch) | |
tree | 6e79c9706ef7707890d40e7f1e894bd786c8f34b /lib | |
parent | cd1ec786238202b987a7624e763dadc725a46a67 (diff) |
Add no-pad option to gensquashfs, sqfs2tar
This works similar to the option for mksquashfs, preventing the image
from being padded to device block size.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common/writer/finish.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/common/writer/finish.c b/lib/common/writer/finish.c index c539579..bd1e11e 100644 --- a/lib/common/writer/finish.c +++ b/lib/common/writer/finish.c @@ -164,9 +164,11 @@ int sqfs_writer_finish(sqfs_writer_t *sqfs, const sqfs_writer_cfg_t *cfg) return -1; } - if (padd_sqfs(sqfs->outfile, sqfs->super.bytes_used, - cfg->devblksize)) { - return -1; + if (!cfg->no_pad) { + if (padd_sqfs(sqfs->outfile, sqfs->super.bytes_used, + cfg->devblksize)) { + return -1; + } } if (!cfg->quiet) |