summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Tricca <flihp@twobit.us>2015-06-17 15:30:53 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2015-08-08 16:43:23 -0400
commit6319e568d0a3a9ac051e86ecf9b8fbc4b151757c (patch)
tree36f4382c40219dab437b67274fc2b2f0c97d4f88
parent56e952f43a00f9f5de97efa09f14b0c972b698cf (diff)
downloadmeta-selinux-6319e568d0a3a9ac051e86ecf9b8fbc4b151757c.tar.gz
e2fsprogs: Add bbappend and stub for xattr module.
Signed-off-by: Philip Tricca <flihp@twobit.us> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r--recipes-devtools/e2fsprogs/e2fsprogs/misc-xattr-add-xattr-module-stub.patch57
-rw-r--r--recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bbappend5
2 files changed, 62 insertions, 0 deletions
diff --git a/recipes-devtools/e2fsprogs/e2fsprogs/misc-xattr-add-xattr-module-stub.patch b/recipes-devtools/e2fsprogs/e2fsprogs/misc-xattr-add-xattr-module-stub.patch
new file mode 100644
index 0000000..5a39abe
--- /dev/null
+++ b/recipes-devtools/e2fsprogs/e2fsprogs/misc-xattr-add-xattr-module-stub.patch
@@ -0,0 +1,57 @@
1This patch adds the structure for a module to duplicate xattr blocks as part
2of copying files with the '-d' option to mke2fs. The function stubs here are
3intended to be the public interface to the module. We also define a macro
4for dumping debug data specific to this module.
5
6Signed-off-by: Philip Tricca <flihp@twobit.us>
7
8Index: e2fsprogs-1.42.9/misc/xattr.c
9===================================================================
10--- /dev/null
11+++ e2fsprogs-1.42.9/misc/xattr.c
12@@ -0,0 +1,34 @@
13+#include "xattr.h"
14+
15+#include <stdio.h>
16+
17+#ifdef XATTR_DEBUG
18+#define XATTR_STDERR(fmt, args...) fprintf (stderr, fmt, ##args)
19+#else
20+#define XATTR_STDERR(fmt, args...) do {} while (0)
21+#endif
22+
23+
24+/* Free remaining resources after all files have been processed. */
25+void
26+xattr_cleanup ()
27+{
28+ XATTR_STDERR ("Cleaning up resources from xattrs.\n");
29+}
30+
31+/* This is the entry point to the xattr module. This function copies the xattrs
32+ * from the file at 'path' to the file system object at 'ino'.
33+ *
34+ * Parameters:
35+ * fs: the file system object for the fs we're operating on
36+ * ino: inode for the object we're labeling
37+ * path: path to the object we're copying xattrs from
38+ */
39+errcode_t
40+set_inode_xattr (ext2_filsys fs, ext2_ino_t ino, const char *path)
41+{
42+ errcode_t ret = 0;
43+
44+ XATTR_STDERR ("Copying xattrs from %s to inode 0x%x.\n", path, ino);
45+ return ret;
46+}
47Index: e2fsprogs-1.42.9/misc/xattr.h
48===================================================================
49--- /dev/null
50+++ e2fsprogs-1.42.9/misc/xattr.h
51@@ -0,0 +1,6 @@
52+#include "et/com_err.h"
53+#include "ext2fs/ext2fs.h"
54+
55+/* Copy xattrs from source file to destination inode */
56+errcode_t set_inode_xattrs(ext2_filsys fs, ext2_ino_t ino, const char *name);
57+void xattr_cleanup ();
diff --git a/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bbappend b/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bbappend
new file mode 100644
index 0000000..02318ea
--- /dev/null
+++ b/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bbappend
@@ -0,0 +1,5 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += " \
4 file://misc-xattr-add-xattr-module-stub.patch \
5"