diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-26 22:44:45 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-26 22:45:02 +0200 |
commit | c42d8e4ead7c20d29bf3996a6a87db0b348f8692 (patch) | |
tree | d54116413fef92c4b542e9083e13eed2809c9278 /mkfs/mkfs.c | |
parent | 20a29fab6382850ac9912c1a44d2cd8101a64184 (diff) |
gensquashfs: add option to simply pack an input directory
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs/mkfs.c')
-rw-r--r-- | mkfs/mkfs.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c index 1fd95be..63b9c98 100644 --- a/mkfs/mkfs.c +++ b/mkfs/mkfs.c @@ -70,8 +70,18 @@ int main(int argc, char **argv) goto out_outfd; } - if (fstree_from_file(&info.fs, info.opt.infile)) - goto out_fstree; + switch (info.opt.mode) { + case PACK_FILE: + if (fstree_from_file(&info.fs, info.opt.infile)) + goto out_fstree; + break; + case PACK_DIR: + if (fstree_from_dir(&info.fs, info.opt.infile)) + goto out_fstree; + break; + default: + assert(0); + } #ifdef WITH_SELINUX if (info.opt.selinux != NULL) { |