aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-11-16 11:08:53 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-11-16 11:09:17 +0100
commitdfba31880be3d3cc5d56707cd05ab306149392e2 (patch)
tree2a334b9dbef1fb4f908be2e4a24816eff52984aa
parentc7cd8bd5edeca20f1807dfc5ac7127417509e77a (diff)
filemap xattr: move data structures to mkfs.h
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-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,