summaryrefslogtreecommitdiff
path: root/mkfs/mkfs.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-29 01:04:37 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-29 01:46:39 +0200
commitdb519e0d3a9fd5a8c35d66341b37def7be813d89 (patch)
tree1927ac8e1d47849d72d0bd464a826952d1f5f5e1 /mkfs/mkfs.c
parent25ccdd1aed35f5ed538cc886e554819d3e918c3e (diff)
Cleanup: fstree_from_file does not need to change working directory
The file_info_t no longer stores the size or other such information, so there is no need to do a stat on the input file. This also means that gensquashfs no longer needs to change the working directory when using the function. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs/mkfs.c')
-rw-r--r--mkfs/mkfs.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c
index 2facc51..fe3fa02 100644
--- a/mkfs/mkfs.c
+++ b/mkfs/mkfs.c
@@ -143,18 +143,9 @@ static int read_fstree(fstree_t *fs, options_t *opt, sqfs_xattr_writer_t *xwr,
return -1;
}
- if (set_working_dir(opt)) {
- fclose(fp);
- return -1;
- }
-
ret = fstree_from_file(fs, opt->infile, fp);
-
fclose(fp);
- if (restore_working_dir(opt))
- return -1;
-
if (ret == 0 && selinux_handle != NULL)
ret = relabel_tree_dfs(xwr, fs->root, selinux_handle);