From e60cfbcdd0081be590cb1aaa84b78ef53077ae92 Mon Sep 17 00:00:00 2001 From: Christian Ebner Date: Thu, 1 Aug 2019 13:08:07 +0200 Subject: [PATCH] src/pxar/format_definition.rs: add struct PxarAttributes This structure contains all the attributes allowing to easily store those within a e.g. dir buffer. Signed-off-by: Christian Ebner --- src/pxar/format_definition.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/pxar/format_definition.rs b/src/pxar/format_definition.rs index 89d79691..25593c9a 100644 --- a/src/pxar/format_definition.rs +++ b/src/pxar/format_definition.rs @@ -301,6 +301,35 @@ pub struct CaFormatQuotaProjID { pub projid: u64, } +#[derive(Debug)] +pub struct PxarAttributes { + pub xattrs: Vec, + pub fcaps: Option, + pub quota_projid: Option, + pub acl_user: Vec, + pub acl_group: Vec, + pub acl_group_obj: Option, + pub acl_default: Option, + pub acl_default_user: Vec, + pub acl_default_group: Vec, +} + +impl PxarAttributes { + pub fn new() -> Self { + Self { + xattrs: Vec::new(), + fcaps: None, + quota_projid: None, + acl_user: Vec::new(), + acl_group: Vec::new(), + acl_group_obj: None, + acl_default: None, + acl_default_user: Vec::new(), + acl_default_group: Vec::new(), + } + } +} + /// Create SipHash values for goodby tables. //pub fn compute_goodbye_hash(name: &std::ffi::CStr) -> u64 { pub fn compute_goodbye_hash(name: &[u8]) -> u64 {