diff options
| author | Alejandro Soto <alejandro@34project.org> | 2021-12-29 09:55:23 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2021-12-29 10:03:06 -0600 |
| commit | 6d3b837335ea1fbd65b8626de9965c6f519145ed (patch) | |
| tree | c5b2570c686832f8267870a1a9d7a300d01916fb /src/fuse/ops.rs | |
| parent | 0020a6a8cd9246a4f04bbf4d25b264626529bab3 (diff) | |
Make Reply::ok_with_handle() public
Diffstat (limited to 'src/fuse/ops.rs')
| -rw-r--r-- | src/fuse/ops.rs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/fuse/ops.rs b/src/fuse/ops.rs index f573842..250fe47 100644 --- a/src/fuse/ops.rs +++ b/src/fuse/ops.rs @@ -185,12 +185,11 @@ op! { self.tail |= proto::OpenOutFlags::DIRECT_IO; } - /// The inode may now be accessed. pub fn ok(self) -> Done<'o> { self.ok_with_handle(0) } - fn ok_with_handle(self, handle: u64) -> Done<'o> { + pub fn ok_with_handle(self, handle: u64) -> Done<'o> { let open_flags = self.tail.bits(); self.single(&proto::OpenOut { @@ -341,6 +340,20 @@ op! { type RequestBody = &'o proto::OpendirIn; type ReplyTail = (); } + + impl Reply { + pub fn ok(self) -> Done<'o> { + self.ok_with_handle(0) + } + + pub fn ok_with_handle(self, handle: u64) -> Done<'o> { + self.single(&proto::OpenOut { + fh: handle, + open_flags: 0, + padding: Default::default(), + }) + } + } } op! { |
