Migrate to use fuse crate's FuseConfig API
The old API is deprecated with a new replacement in
https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3514617
Note that the original API uses write/read in an opposite perspective:
a write to the filesystem by another process is a read to these FUSE
filesystems. Which is also inconsistent to the mount opion of max_read.
The new API brings consistency. For this specific change:
- zipfuse happened to name them in the opposite (but now correct) way.
- authfs happened to use the same values for both, so just update the
comments. Also remove the comment in remote_file.rs that mentioned
the old API. It's not super helpful anyway with the compiler check.
Bug: 223659448
Test: atest AuthFsHostTest
Change-Id: I33436cdc3bf84c3a0d42a6b517fe9ef28958292a
diff --git a/zipfuse/src/main.rs b/zipfuse/src/main.rs
index a91642c..c3fae69 100644
--- a/zipfuse/src/main.rs
+++ b/zipfuse/src/main.rs
@@ -82,7 +82,9 @@
libc::MS_NOSUID | libc::MS_NODEV | libc::MS_RDONLY,
&mount_options,
)?;
- Ok(fuse::worker::start_message_loop(dev_fuse, MAX_READ, MAX_WRITE, ZipFuse::new(zip_file)?)?)
+ let mut config = fuse::FuseConfig::new();
+ config.dev_fuse(dev_fuse).max_write(MAX_WRITE).max_read(MAX_READ);
+ Ok(config.enter_message_loop(ZipFuse::new(zip_file)?)?)
}
struct ZipFuse {