#include <ctype.h>
#include <time.h>
#include <getopt.h>
+#ifndef WITHOUT_XATTR
#include <sys/xattr.h>
#include <sys/acl.h>
+#endif
#include <byteswap.h>
#define crc32 __complete_crap
#include <zlib.h>
padword();
}
+#ifndef WITHOUT_XATTR
typedef struct xattr_entry {
struct xattr_entry *next;
uint32_t xid;
}
}
+#else /* WITHOUT_XATTR */
+#define write_xattr_entry(x)
+#endif
+
static void recursive_populate_directory(struct filesystem_entry *dir)
{
struct filesystem_entry *e;
{"test-compression", 0, NULL, 't'},
{"compressor-priority", 1, NULL, 'y'},
{"incremental", 1, NULL, 'i'},
+#ifndef WITHOUT_XATTR
{"with-xattr", 0, NULL, 1000 },
{"with-selinux", 0, NULL, 1001 },
{"with-posix-acl", 0, NULL, 1002 },
+#endif
{NULL, 0, NULL, 0}
};
" -q, --squash Squash permissions and owners making all files be owned by root\n"
" -U, --squash-uids Squash owners making all files be owned by root\n"
" -P, --squash-perms Squash permissions on all files\n"
+#ifndef WITHOUT_XATTR
" --with-xattr stuff all xattr entries into image\n"
" --with-selinux stuff only SELinux Labels into jffs2 image\n"
" --with-posix-acl stuff only POSIX ACL entries into jffs2 image\n"
+#endif
" -h, --help Display this help text\n"
" -v, --verbose Verbose operation\n"
" -V, --version Display version information\n"
perror_msg_and_die("cannot open (incremental) file");
}
break;
+#ifndef WITHOUT_XATTR
case 1000: /* --with-xattr */
enable_xattr |= (1 << JFFS2_XPREFIX_USER)
| (1 << JFFS2_XPREFIX_SECURITY)
enable_xattr |= (1 << JFFS2_XPREFIX_ACL_ACCESS)
| (1 << JFFS2_XPREFIX_ACL_DEFAULT);
break;
+#endif
}
}
if (out_fd == -1) {