catar: define all feature flags
This commit is contained in:
parent
4c0fd4871e
commit
b41d1aab8c
|
@ -148,7 +148,7 @@ impl <'a, W: Write> CaTarEncoder<'a, W> {
|
|||
|
||||
|
||||
let entry = CaFormatEntry {
|
||||
feature_flags: CA_FORMAT_FEATURE_FLAGS_MAX, // fixme: ??
|
||||
feature_flags: CA_FORMAT_DEFAULT, // fixme: ??
|
||||
mode: mode,
|
||||
flags: 0,
|
||||
uid: stat.st_uid as u64,
|
||||
|
|
|
@ -75,7 +75,65 @@ pub const CA_FORMAT_WITH_FLAG_NOCOMP: u64 = 0x1000000;
|
|||
/// Linux file attribute `PROJINHERIT`
|
||||
pub const CA_FORMAT_WITH_FLAG_PROJINHERIT: u64 = 0x2000000;
|
||||
|
||||
pub const CA_FORMAT_FEATURE_FLAGS_MAX: u64 = 0xb000_0001_ffef_fe26; // fixme: ?
|
||||
|
||||
// Include BTRFS subvolume flag
|
||||
pub const CA_FORMAT_WITH_SUBVOLUME: u64 = 0x4000000;
|
||||
// Include BTRFS read-only subvolume flag
|
||||
pub const CA_FORMAT_WITH_SUBVOLUME_RO: u64 = 0x8000000;
|
||||
|
||||
/// Include Extended Attribute metadata */
|
||||
pub const CA_FORMAT_WITH_XATTRS: u64 = 0x10000000;
|
||||
/// Include Access Control List metadata
|
||||
pub const CA_FORMAT_WITH_ACL: u64 = 0x20000000;
|
||||
/// Include SELinux security context
|
||||
pub const CA_FORMAT_WITH_SELINUX: u64 = 0x40000000;
|
||||
/// Include "security.capability" xattr
|
||||
pub const CA_FORMAT_WITH_FCAPS: u64 = 0x80000000;
|
||||
|
||||
/// XFS/ext4 project quota ID
|
||||
pub const CA_FORMAT_WITH_QUOTA_PROJID: u64 = 0x100000000;
|
||||
|
||||
/// Support ".caexclude" files
|
||||
pub const CA_FORMAT_EXCLUDE_FILE: u64 = 0x1000000000000000;
|
||||
/// the purpose of this flag is still unclear
|
||||
pub const CA_FORMAT_SHA512_256: u64 = 0x2000000000000000;
|
||||
/// Exclude submounts
|
||||
pub const CA_FORMAT_EXCLUDE_SUBMOUNTS: u64 = 0x4000000000000000;
|
||||
/// Exclude entries with chattr flag NODUMP
|
||||
pub const CA_FORMAT_EXCLUDE_NODUMP: u64 = 0x8000000000000000;
|
||||
|
||||
pub const CA_FORMAT_DEFAULT: u64 =
|
||||
CA_FORMAT_WITH_32BIT_UIDS |
|
||||
CA_FORMAT_WITH_USER_NAMES |
|
||||
CA_FORMAT_WITH_NSEC_TIME|
|
||||
CA_FORMAT_WITH_SYMLINKS|
|
||||
CA_FORMAT_WITH_DEVICE_NODES|
|
||||
CA_FORMAT_WITH_FIFOS|
|
||||
CA_FORMAT_WITH_SOCKETS|
|
||||
CA_FORMAT_WITH_FLAG_HIDDEN|
|
||||
CA_FORMAT_WITH_FLAG_SYSTEM|
|
||||
CA_FORMAT_WITH_FLAG_ARCHIVE|
|
||||
CA_FORMAT_WITH_FLAG_APPEND|
|
||||
CA_FORMAT_WITH_FLAG_NOATIME|
|
||||
CA_FORMAT_WITH_FLAG_COMPR|
|
||||
CA_FORMAT_WITH_FLAG_NOCOW|
|
||||
//CA_FORMAT_WITH_FLAG_NODUMP|
|
||||
CA_FORMAT_WITH_FLAG_DIRSYNC|
|
||||
CA_FORMAT_WITH_FLAG_IMMUTABLE|
|
||||
CA_FORMAT_WITH_FLAG_SYNC|
|
||||
CA_FORMAT_WITH_FLAG_NOCOMP|
|
||||
CA_FORMAT_WITH_FLAG_PROJINHERIT|
|
||||
CA_FORMAT_WITH_SUBVOLUME|
|
||||
CA_FORMAT_WITH_SUBVOLUME_RO|
|
||||
CA_FORMAT_WITH_XATTRS|
|
||||
CA_FORMAT_WITH_ACL|
|
||||
CA_FORMAT_WITH_SELINUX|
|
||||
CA_FORMAT_WITH_FCAPS|
|
||||
CA_FORMAT_WITH_QUOTA_PROJID |
|
||||
|
||||
CA_FORMAT_EXCLUDE_NODUMP|
|
||||
CA_FORMAT_EXCLUDE_FILE|
|
||||
CA_FORMAT_SHA512_256;
|
||||
|
||||
#[derive(Endian)]
|
||||
#[repr(C)]
|
||||
|
|
Loading…
Reference in New Issue