summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2021-12-27 02:54:50 -0600
committerAlejandro Soto <alejandro@34project.org>2021-12-28 19:43:45 -0600
commit80fc84344e612a979d1eb048b2c02c41417b36be (patch)
tree28153325b70220b77d8ca91aa41de96d00426a81 /examples
parenta3212a0ba07da7bdae9e17637fbc237e2ae01c08 (diff)
Implement init hook
Diffstat (limited to 'examples')
-rw-r--r--examples/ext2.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/ext2.rs b/examples/ext2.rs
index 9bcc2a6..5552a58 100644
--- a/examples/ext2.rs
+++ b/examples/ext2.rs
@@ -300,7 +300,7 @@ impl Ext2 {
}
impl Ext2 {
- async fn init<'o>(&self, (_, reply): Op<'o, Init>) -> Done<'o> {
+ fn init<'o>(&self, (_, reply): Op<'o, Init>) -> Done<'o> {
let label = &self.superblock.s_volume_name;
let label = &label[..=label.iter().position(|byte| *byte == b'\0').unwrap_or(0)];
let label = CStr::from_bytes_with_nul(label)
@@ -481,7 +481,7 @@ impl Known for Resolved {
}
async fn main_loop(session: Start, fs: Ext2) -> FuseResult<()> {
- let session = session.start().await?;
+ let session = session.start(|op| fs.init(op)).await?;
let mut endpoint = session.endpoint();
loop {