From 687e44297071c95004d47e389fc409b951a8f9ff Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 27 Apr 2020 20:19:46 +0200 Subject: Cleanup/fix: gensquashfs: split directory scanning from xattr scanning On the one hand, this commit cleanes the code a bit by splitting the "scan directory contents" code from the "scan xattrs from directory contents" and moving the later in a seperate file. On the other hand, the xattr scanning is now done *after* the fstree is post processed, which includes sorting it. This way, the xattrs are always added in a deterministic, reproducible order. Signed-off-by: David Oberhollenzer --- bin/gensquashfs/mkfs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin/gensquashfs/mkfs.h') diff --git a/bin/gensquashfs/mkfs.h b/bin/gensquashfs/mkfs.h index 9a36d8c..6aa0c87 100644 --- a/bin/gensquashfs/mkfs.h +++ b/bin/gensquashfs/mkfs.h @@ -63,9 +63,10 @@ enum { void process_command_line(options_t *opt, int argc, char **argv); -int fstree_from_dir(fstree_t *fs, const char *path, void *selinux_handle, - sqfs_xattr_writer_t *xwr, unsigned int flags); +int fstree_from_dir(fstree_t *fs, const char *path, unsigned int flags); +int xattrs_from_dir(fstree_t *fs, const char *path, void *selinux_handle, + sqfs_xattr_writer_t *xwr, unsigned int flags); void *selinux_open_context_file(const char *filename); -- cgit v1.2.3