summaryrefslogtreecommitdiff
path: root/tar/bsdtar.h
diff options
context:
space:
mode:
authorMartin Matuska <martin@matuska.org>2017-02-23 22:56:40 +0100
committerMartin Matuska <martin@matuska.org>2017-02-24 02:19:28 +0100
commit6127a37e01bd4ca3cdff310d69b174e82e22b7c7 (patch)
tree242d22015cc4ec0823ec4f89422b075ee894729f /tar/bsdtar.h
parent8530618fa0a3836843388061ddfa65cf1f1efa0d (diff)
downloadlibarchive-6127a37e01bd4ca3cdff310d69b174e82e22b7c7.tar.gz
tar: add new options to allow fine-tuning of --preserve-permissions
Allow enabling and disabling reading or writing of: Access Control Lists (--acls, --no-acls) Extended file flags (--fflags, --no-fflags) Extended attributes (--xattrs, --no-xattrs) Mac OS X metadata in AppleDouble (--mac-metadata, --no-mac-metadata) Make --disable-copyfile an alias to --no-mac-metadata.
Diffstat (limited to 'tar/bsdtar.h')
-rw-r--r--tar/bsdtar.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/tar/bsdtar.h b/tar/bsdtar.h
index 89cf2f9a..ee9c6485 100644
--- a/tar/bsdtar.h
+++ b/tar/bsdtar.h
@@ -50,7 +50,7 @@ struct bsdtar {
int bytes_per_block; /* -b block_size */
int bytes_in_last_block; /* See -b handling. */
int verbose; /* -v */
- int flags; /* Bitfield of boolean options */
+ unsigned int flags; /* Bitfield of boolean options */
int extract_flags; /* Flags for extract operation */
int readdisk_flags; /* Flags for read disk operation */
int strip_components; /* Remove this many leading dirs */
@@ -118,16 +118,24 @@ struct bsdtar {
#define OPTFLAG_TOTALS (0x00001000) /* --totals */
#define OPTFLAG_UNLINK_FIRST (0x00002000) /* -U */
#define OPTFLAG_WARN_LINKS (0x00004000) /* --check-links */
-#define OPTFLAG_NO_XATTR (0x00008000) /* --no-xattr */
+#define OPTFLAG_NO_XATTRS (0x00008000) /* --no-xattrs */
+#define OPTFLAG_XATTRS (0x00010000) /* --xattrs */
+#define OPTFLAG_NO_ACLS (0x00020000) /* --no-acls */
+#define OPTFLAG_ACLS (0x00040000) /* --acls */
+#define OPTFLAG_NO_FFLAGS (0x00080000) /* --no-fflags */
+#define OPTFLAG_FFLAGS (0x00100000) /* --fflags */
+#define OPTFLAG_NO_MAC_METADATA (0x00200000) /* --no-mac-metadata */
+#define OPTFLAG_MAC_METADATA (0x00400000) /* --mac-metadata */
/* Fake short equivalents for long options that otherwise lack them. */
enum {
- OPTION_B64ENCODE = 1,
+ OPTION_ACLS = 1,
+ OPTION_B64ENCODE,
OPTION_CHECK_LINKS,
OPTION_CHROOT,
OPTION_CLEAR_NOCHANGE_FFLAGS,
- OPTION_DISABLE_COPYFILE,
OPTION_EXCLUDE,
+ OPTION_FFLAGS,
OPTION_FORMAT,
OPTION_GID,
OPTION_GNAME,
@@ -142,15 +150,19 @@ enum {
OPTION_LZIP,
OPTION_LZMA,
OPTION_LZOP,
+ OPTION_MAC_METADATA,
OPTION_NEWER_CTIME,
OPTION_NEWER_CTIME_THAN,
OPTION_NEWER_MTIME,
OPTION_NEWER_MTIME_THAN,
OPTION_NODUMP,
OPTION_NOPRESERVE_HFS_COMPRESSION,
+ OPTION_NO_ACLS,
+ OPTION_NO_FFLAGS,
+ OPTION_NO_MAC_METADATA,
OPTION_NO_SAME_OWNER,
OPTION_NO_SAME_PERMISSIONS,
- OPTION_NO_XATTR,
+ OPTION_NO_XATTRS,
OPTION_NULL,
OPTION_NUMERIC_OWNER,
OPTION_OLDER_CTIME,
@@ -168,7 +180,8 @@ enum {
OPTION_UNAME,
OPTION_USE_COMPRESS_PROGRAM,
OPTION_UUENCODE,
- OPTION_VERSION
+ OPTION_VERSION,
+ OPTION_XATTRS
};
int bsdtar_getopt(struct bsdtar *);