summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-03-01 21:42:50 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-03-01 21:42:50 +0000
commit26ebd81c1d73d7ce77e1c0cb5ac67c6d2ba4f004 (patch)
treead2befc167d7f87d4eada4fc4d034cb2a4600f7c
parentcf9a4f670144efdb2d335f1e6ed36795136b7716 (diff)
parent8a63232ae7d992c148b75a03d83df5c2188935fc (diff)
downloadextras-26ebd81c1d73d7ce77e1c0cb5ac67c6d2ba4f004.tar.gz
Merge "ext4_utils: use android_filesystem_capability.h"
-rw-r--r--ext4_utils/contents.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/ext4_utils/contents.c b/ext4_utils/contents.c
index 586e97e6..3abbdc35 100644
--- a/ext4_utils/contents.c
+++ b/ext4_utils/contents.c
@@ -17,27 +17,15 @@
#include <sys/stat.h>
#include <string.h>
#include <stdio.h>
-#if defined(__linux__)
+
+#ifdef HAVE_ANDROID_OS
#include <linux/capability.h>
-#include <linux/xattr.h>
#else
-#include <stdint.h>
-#define VFS_CAP_FLAGS_EFFECTIVE 0x000001
-#define VFS_CAP_U32_2 2
-#define VFS_CAP_U32 VFS_CAP_U32_2
-#define VFS_CAP_REVISION_2 0x02000000
-#define VFS_CAP_REVISION VFS_CAP_REVISION_2
-
-struct vfs_cap_data {
- uint32_t magic_etc;
- struct {
- uint32_t permitted;
- uint32_t inheritable;
- } data[VFS_CAP_U32];
-};
+#include <private/android_filesystem_capability.h>
+#endif
+
#define XATTR_SELINUX_SUFFIX "selinux"
#define XATTR_CAPS_SUFFIX "capability"
-#endif /* !defined(__linux__) */
#include "ext4_utils.h"
#include "ext4.h"