Allow creating empty filesystem images
[project/make_ext4fs.git] / contents.c
index bfdb657..1e5361e 100644 (file)
 #include <string.h>
 #include <stdio.h>
 
-#ifdef HAVE_ANDROID_OS
-#include <linux/capability.h>
-#else
 #include <private/android_filesystem_capability.h>
-#endif
 
 #define XATTR_SELINUX_SUFFIX "selinux"
 #define XATTR_CAPS_SUFFIX "capability"
 
 #include "ext4_utils.h"
-#include "make_ext4fs.h"
 #include "allocate.h"
 #include "contents.h"
 #include "extent.h"
 #include "indirect.h"
 
-#ifdef USE_MINGW
-#define S_IFLNK 0  /* used by make_link, not needed under mingw */
-#endif
-
 static struct block_allocation* saved_allocation_head = NULL;
 
 struct block_allocation* get_saved_allocation_chain() {
@@ -497,15 +488,6 @@ static int xattr_add(u32 inode_num, int name_index, const char *name,
        return result;
 }
 
-int inode_set_selinux(u32 inode_num, const char *secon)
-{
-       if (!secon)
-               return 0;
-
-       return xattr_add(inode_num, EXT4_XATTR_INDEX_SECURITY,
-               XATTR_SELINUX_SUFFIX, secon, strlen(secon) + 1);
-}
-
 int inode_set_capabilities(u32 inode_num, uint64_t capabilities) {
        if (capabilities == 0)
                return 0;