(
source: Source,
target: Target,
file_system_type: Fs,
flags: MountFlags,
data: Data,
)
| 15 | /// [Linux]: https://man7.org/linux/man-pages/man2/mount.2.html |
| 16 | #[inline] |
| 17 | pub fn mount< |
| 18 | 'a, |
| 19 | Source: path::Arg, |
| 20 | Target: path::Arg, |
| 21 | Fs: path::Arg, |
| 22 | Data: Into<Option<&'a CStr>>, |
| 23 | >( |
| 24 | source: Source, |
| 25 | target: Target, |
| 26 | file_system_type: Fs, |
| 27 | flags: MountFlags, |
| 28 | data: Data, |
| 29 | ) -> io::Result<()> { |
| 30 | source.into_with_c_str(|source| { |
| 31 | target.into_with_c_str(|target| { |
| 32 | file_system_type.into_with_c_str(|file_system_type| { |
| 33 | option_into_with_c_str(data.into(), |data| { |
| 34 | backend::mount::syscalls::mount( |
| 35 | Some(source), |
| 36 | target, |
| 37 | Some(file_system_type), |
| 38 | MountFlagsArg(flags.bits()), |
| 39 | data, |
| 40 | ) |
| 41 | }) |
| 42 | }) |
| 43 | }) |
| 44 | }) |
| 45 | } |
| 46 | |
| 47 | /// `mount(NULL, target, NULL, MS_REMOUNT | mountflags, data)` |
| 48 | /// |
no test coverage detected