diff options
Diffstat (limited to '')
| -rw-r--r-- | src/proto.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/proto.rs b/src/proto.rs index 128112d..2d53fe6 100644 --- a/src/proto.rs +++ b/src/proto.rs @@ -348,12 +348,25 @@ pub struct GetxattrIn { #[derive(Pod, Zeroable, Copy, Clone)] #[repr(C)] +pub struct GetxattrOut { + pub size: u32, + pub padding: u32, +} + +#[derive(Pod, Zeroable, Copy, Clone)] +#[repr(C)] pub struct ListxattrIn { pub getxattr_in: GetxattrIn, } #[derive(Pod, Zeroable, Copy, Clone)] #[repr(C)] +pub struct ListxattrOut { + pub getxattr_out: GetxattrOut, +} + +#[derive(Pod, Zeroable, Copy, Clone)] +#[repr(C)] pub struct FlushIn { pub fh: u64, pub unused: u32, @@ -596,6 +609,19 @@ where } } +impl<'o, T, U, V> Structured<'o> for (T, U, V) +where + T: Structured<'o>, + U: Structured<'o>, + V: Structured<'o>, +{ + fn split_from(bytes: &'o [u8], header: &InHeader, last: bool) -> FuseResult<(Self, &'o [u8])> { + let (first, bytes) = T::split_from(bytes, header, false)?; + let ((second, third), end) = <(U, V)>::split_from(bytes, header, last)?; + Ok(((first, second, third), end)) + } +} + impl<'o, T: Pod> Structured<'o> for &'o T { fn split_from(bytes: &'o [u8], _: &InHeader, _last: bool) -> FuseResult<(Self, &'o [u8])> { let (bytes, next_bytes) = bytes.split_at(bytes.len().min(std::mem::size_of::<T>())); |
