|
2 | 2 | //!
|
3 | 3 | //! Raw communication channel to the FUSE kernel driver.
|
4 | 4 |
|
5 |
| -#[cfg(feature = "libfuse2")] |
| 5 | +#[cfg(fuser_mount_impl = "libfuse2")] |
6 | 6 | mod fuse2;
|
7 | 7 | #[cfg(any(feature = "libfuse", test))]
|
8 | 8 | mod fuse2_sys;
|
9 |
| -#[cfg(feature = "libfuse3")] |
| 9 | +#[cfg(fuser_mount_impl = "libfuse3")] |
10 | 10 | mod fuse3;
|
11 |
| -#[cfg(feature = "libfuse3")] |
| 11 | +#[cfg(fuser_mount_impl = "libfuse3")] |
12 | 12 | mod fuse3_sys;
|
13 | 13 |
|
14 |
| -#[cfg(not(feature = "libfuse"))] |
| 14 | +#[cfg(fuser_mount_impl = "pure-rust")] |
15 | 15 | mod fuse_pure;
|
16 | 16 | pub mod mount_options;
|
17 | 17 |
|
18 |
| -#[cfg(any(feature = "libfuse", test))] |
| 18 | +#[cfg(any(test, feature = "libfuse"))] |
19 | 19 | use fuse2_sys::fuse_args;
|
20 | 20 | #[cfg(any(test, not(feature = "libfuse")))]
|
21 | 21 | use std::fs::File;
|
22 |
| -#[cfg(any(test, not(feature = "libfuse"), not(feature = "libfuse3")))] |
| 22 | +#[cfg(any(test, fuser_mount_impl = "pure-rust", fuser_mount_impl = "libfuse2"))] |
23 | 23 | use std::io;
|
24 | 24 |
|
25 | 25 | #[cfg(any(feature = "libfuse", test))]
|
@@ -47,16 +47,16 @@ fn with_fuse_args<T, F: FnOnce(&fuse_args) -> T>(options: &[MountOption], f: F)
|
47 | 47 | })
|
48 | 48 | }
|
49 | 49 |
|
50 |
| -#[cfg(feature = "libfuse2")] |
| 50 | +#[cfg(fuser_mount_impl = "libfuse2")] |
51 | 51 | pub use fuse2::Mount;
|
52 |
| -#[cfg(feature = "libfuse3")] |
| 52 | +#[cfg(fuser_mount_impl = "libfuse3")] |
53 | 53 | pub use fuse3::Mount;
|
54 |
| -#[cfg(not(feature = "libfuse"))] |
| 54 | +#[cfg(fuser_mount_impl = "pure-rust")] |
55 | 55 | pub use fuse_pure::Mount;
|
56 |
| -#[cfg(not(feature = "libfuse3"))] |
| 56 | +#[cfg(not(fuser_mount_impl = "libfuse3"))] |
57 | 57 | use std::ffi::CStr;
|
58 | 58 |
|
59 |
| -#[cfg(not(feature = "libfuse3"))] |
| 59 | +#[cfg(not(fuser_mount_impl = "libfuse3"))] |
60 | 60 | #[inline]
|
61 | 61 | fn libc_umount(mnt: &CStr) -> io::Result<()> {
|
62 | 62 | #[cfg(any(
|
@@ -85,7 +85,7 @@ fn libc_umount(mnt: &CStr) -> io::Result<()> {
|
85 | 85 |
|
86 | 86 | /// Warning: This will return true if the filesystem has been detached (lazy unmounted), but not
|
87 | 87 | /// yet destroyed by the kernel.
|
88 |
| -#[cfg(any(test, not(feature = "libfuse")))] |
| 88 | +#[cfg(any(test, fuser_mount_impl = "pure-rust"))] |
89 | 89 | fn is_mounted(fuse_device: &File) -> bool {
|
90 | 90 | use libc::{poll, pollfd};
|
91 | 91 | use std::os::unix::prelude::AsRawFd;
|
|
0 commit comments