summaryrefslogtreecommitdiff
path: root/mkfs/mkfs.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-11 00:35:29 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-19 14:27:34 +0200
commit28b24512622785d1634a089f7d1d5c25edfb7577 (patch)
treea9ff798441dd71dc99ac73cb20edc0e0ca45fc7b /mkfs/mkfs.c
parent0bbd84e31ec8bbe8d1e28e981c577fd56c8b8664 (diff)
Add SELinux option to gensquashfs
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, 9 insertions, 0 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c
index ae6210b..d028a9d 100644
--- a/mkfs/mkfs.c
+++ b/mkfs/mkfs.c
@@ -72,6 +72,15 @@ int main(int argc, char **argv)
if (fstree_from_file(&info.fs, info.opt.infile))
goto out_fstree;
+#ifdef WITH_SELINUX
+ if (info.opt.selinux != NULL) {
+ if (fstree_relabel_selinux(&info.fs, info.opt.selinux))
+ goto out_fstree;
+ }
+#endif
+
+ fstree_xattr_deduplicate(&info.fs);
+
fstree_sort(&info.fs);
info.cmp = compressor_create(info.super.compression_id, true,