diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-01-31 11:21:30 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-01-31 13:51:49 +0100 |
commit | cdccc69c62579b0c13b35fad0728079652b8f3c9 (patch) | |
tree | 9fa54c710f73c5e08a9c8466e7a712eb63ee07ac /lib/common/writer/cleanup.c | |
parent | 2182129c8f359c4fa1390eaba7a65b595ccd4182 (diff) |
Move library source into src sub-directory
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/common/writer/cleanup.c')
-rw-r--r-- | lib/common/writer/cleanup.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/lib/common/writer/cleanup.c b/lib/common/writer/cleanup.c deleted file mode 100644 index a3fd039..0000000 --- a/lib/common/writer/cleanup.c +++ /dev/null @@ -1,39 +0,0 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later */ -/* - * cleanup.c - * - * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> - */ -#include "simple_writer.h" - -#include <stdlib.h> - -void sqfs_writer_cleanup(sqfs_writer_t *sqfs, int status) -{ - sqfs_drop(sqfs->xwr); - sqfs_drop(sqfs->dirwr); - sqfs_drop(sqfs->dm); - sqfs_drop(sqfs->im); - sqfs_drop(sqfs->idtbl); - sqfs_drop(sqfs->data); - sqfs_drop(sqfs->blkwr); - sqfs_drop(sqfs->fragtbl); - sqfs_drop(sqfs->cmp); - sqfs_drop(sqfs->uncmp); - fstree_cleanup(&sqfs->fs); - sqfs_drop(sqfs->outfile); - - if (status != EXIT_SUCCESS) { -#if defined(_WIN32) || defined(__WINDOWS__) - WCHAR *path = path_to_windows(sqfs->filename); - - if (path != NULL) - DeleteFileW(path); - - free(path); -#else - unlink(sqfs->filename); -#endif - } -} - |