diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-31 19:25:16 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-31 19:25:16 +0200 |
commit | 3559e5e0e840839ae85aa02c0748f89676c0a5e8 (patch) | |
tree | 004066f10f22b245d22ac73f71fd17ac5c8e3f06 /mkfs/mkfs.c | |
parent | c4a945dd254af75d334fdd881076c665184faa31 (diff) |
gensquashfs: allow combining packdir and packfile
If packdir and packfile are both specified, use packdir as
alternate root.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs/mkfs.c')
-rw-r--r-- | mkfs/mkfs.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c index 63b9c98..a6f19f1 100644 --- a/mkfs/mkfs.c +++ b/mkfs/mkfs.c @@ -70,17 +70,12 @@ int main(int argc, char **argv) goto out_outfd; } - switch (info.opt.mode) { - case PACK_FILE: - if (fstree_from_file(&info.fs, info.opt.infile)) + if (info.opt.infile != NULL) { + if (fstree_from_file(&info.fs, info.opt.infile, info.opt.packdir)) goto out_fstree; - break; - case PACK_DIR: - if (fstree_from_dir(&info.fs, info.opt.infile)) + } else { + if (fstree_from_dir(&info.fs, info.opt.packdir)) goto out_fstree; - break; - default: - assert(0); } #ifdef WITH_SELINUX |