pxar: pass feature_flags to encoder/decoder instead of individual flags

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
Christian Ebner
2019-05-23 13:10:20 +02:00
committed by Dietmar Maurer
parent 687407741b
commit b344461b33
7 changed files with 30 additions and 35 deletions

View File

@ -64,8 +64,7 @@ impl <'a, W: Write> Encoder<'a, W> {
writer: &'a mut W,
all_file_systems: bool,
verbose: bool,
no_xattrs: bool,
no_fcaps: bool,
feature_flags: u64,
) -> Result<(), Error> {
const FILE_COPY_BUFFER_SIZE: usize = 1024*1024;
@ -91,13 +90,6 @@ impl <'a, W: Write> Encoder<'a, W> {
if is_virtual_file_system(magic) {
bail!("backup virtual file systems is disabled!");
}
let mut feature_flags = CA_FORMAT_DEFAULT;
if no_xattrs {
feature_flags ^= CA_FORMAT_WITH_XATTRS;
}
if no_fcaps {
feature_flags ^= CA_FORMAT_WITH_FCAPS;
}
let mut me = Self {
base_path: path,