aboutsummaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-04-16 05:13:50 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-04-16 05:17:29 +0200
commit6b3e6d299d5298a5936dbba57f67cdfc4a406789 (patch)
tree28efefb83f05abbe4edd3944e2019a1d79669833 /mkfs
parent943dc3fa216913bff7e2dd267a9f52f082c04663 (diff)
tar2sqfs & gensquashfs: Delete the output file on failure
This commit changes the tar2sqfs & gensquashfs code to pass the exit status on to sqfs_writer_cleanup in libcommon. The function sqfs writer code in libcommon is changed to retain the output file name and delete it if the status passed to the cleanup function is anything other than EXIT_SUCCESS. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs')
-rw-r--r--mkfs/mkfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c
index 0ef65ca..9ffbb94 100644
--- a/mkfs/mkfs.c
+++ b/mkfs/mkfs.c
@@ -211,6 +211,6 @@ int main(int argc, char **argv)
status = EXIT_SUCCESS;
out:
- sqfs_writer_cleanup(&sqfs);
+ sqfs_writer_cleanup(&sqfs, status);
return status;
}