From e9d1d3dc9aa4b53be536f97f253cc908e58429ec Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 26 Sep 2024 11:47:24 +0200 Subject: 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 --- lib/common/writer/finish.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/common') 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) -- cgit v1.2.3