aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/gensquashfs/filemap_xattr.c17
-rw-r--r--bin/gensquashfs/mkfs.h18
2 files changed, 18 insertions, 17 deletions
diff --git a/bin/gensquashfs/filemap_xattr.c b/bin/gensquashfs/filemap_xattr.c
index f241617..44ed9de 100644
--- a/bin/gensquashfs/filemap_xattr.c
+++ b/bin/gensquashfs/filemap_xattr.c
@@ -10,23 +10,6 @@
#define NEW_FILE_START "# file: "
-struct XattrMapEntry {
- char *key;
- char *value;
- size_t value_len;
- struct XattrMapEntry *next;
-};
-
-struct XattrMapPattern {
- char *path;
- struct XattrMapEntry *entries;
- struct XattrMapPattern *next;
-};
-
-struct XattrMap {
- struct XattrMapPattern *patterns;
-};
-
// Taken from attr-2.5.1/tools/setfattr.c
static int
hex_digit(char c) {
diff --git a/bin/gensquashfs/mkfs.h b/bin/gensquashfs/mkfs.h
index 1254770..bbecdbb 100644
--- a/bin/gensquashfs/mkfs.h
+++ b/bin/gensquashfs/mkfs.h
@@ -3,6 +3,7 @@
* mkfs.h
*
* Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
+ * Copyright (C) 2022 Enno Boland <mail@eboland.de>
*/
#ifndef MKFS_H
#define MKFS_H
@@ -60,6 +61,23 @@ typedef struct {
bool scan_xattr;
} options_t;
+struct XattrMapEntry {
+ char *key;
+ char *value;
+ size_t value_len;
+ struct XattrMapEntry *next;
+};
+
+struct XattrMapPattern {
+ char *path;
+ struct XattrMapEntry *entries;
+ struct XattrMapPattern *next;
+};
+
+struct XattrMap {
+ struct XattrMapPattern *patterns;
+};
+
void process_command_line(options_t *opt, int argc, char **argv);
int xattrs_from_dir(fstree_t *fs, const char *path, void *selinux_handle,