diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-11 00:31:17 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-11 00:31:17 +0200 |
commit | eb01ccca21a9a2e1693b28871f65934e8931e3bf (patch) | |
tree | 2a2c76e4bbb3668fdf4e0aa667c80519c76b01f4 /mkfs | |
parent | b3c3401aee91bc2ff46ba0eab0ceb88c78cb5bbb (diff) |
Replace fstree_from_dir boolean with flag field
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs')
-rw-r--r-- | mkfs/mkfs.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c index 79dded9..8b8ecc3 100644 --- a/mkfs/mkfs.c +++ b/mkfs/mkfs.c @@ -68,11 +68,18 @@ static int pack_files(data_writer_t *data, fstree_t *fs, options_t *opt) static int read_fstree(fstree_t *fs, options_t *opt) { + unsigned int flags; FILE *fp; int ret; - if (opt->infile == NULL) - return fstree_from_dir(fs, opt->packdir, opt->keep_time); + if (opt->infile == NULL) { + flags = 0; + + if (opt->keep_time) + flags |= DIR_SCAN_KEEP_TIME; + + return fstree_from_dir(fs, opt->packdir, flags); + } fp = fopen(opt->infile, "rb"); if (fp == NULL) { |