aboutsummaryrefslogtreecommitdiff
path: root/tar
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-23 02:19:27 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-23 02:39:57 +0200
commit73dec828ad61d046d10648ddca5c89ce70352a7a (patch)
treef9c6ac79c1a97736d9c39a282f78dca4ef4ec04d /tar
parent0b22d6ad0ebed2af239259dbfa36cd9920c6f4a2 (diff)
Move fstree default option processing to fstree code
Instead of decomposing a default string in gensquashfs option processing, move that to fstree_init instead and pass the option string directly to fstree_init. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tar')
-rw-r--r--tar/tar2sqfs.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/tar/tar2sqfs.c b/tar/tar2sqfs.c
index b8952a9..c3fdb45 100644
--- a/tar/tar2sqfs.c
+++ b/tar/tar2sqfs.c
@@ -49,10 +49,6 @@ static const char *usagestr =
static const char *filename;
static int block_size = SQFS_DEFAULT_BLOCK_SIZE;
-static uint32_t def_mtime = 0;
-static uint16_t def_mode = 0755;
-static uint32_t def_uid = 0;
-static uint32_t def_gid = 0;
static size_t devblksize = SQFS_DEVBLK_SIZE;
static bool quiet = false;
static int outmode = O_WRONLY | O_CREAT | O_EXCL;
@@ -188,10 +184,8 @@ int main(int argc, char **argv)
return EXIT_FAILURE;
}
- if (fstree_init(&fs, block_size, def_mtime, def_mode,
- def_uid, def_gid)) {
+ if (fstree_init(&fs, block_size, NULL))
goto out_fd;
- }
comp_id = compressor_get_default();
@@ -201,7 +195,7 @@ int main(int argc, char **argv)
goto out_fs;
}
- if (sqfs_super_init(&super, block_size, def_mtime, comp_id))
+ if (sqfs_super_init(&super, block_size, fs.defaults.st_mtime, comp_id))
goto out_cmp;
if (sqfs_super_write(&super, outfd))