Skip to main content

fuser/ll/flags/
ioctl_flags.rs

1use std::fmt::Display;
2use std::fmt::Formatter;
3
4bitflags::bitflags! {
5    /// Ioctl flags.
6    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
7    pub struct IoctlFlags: u32 {
8        /// 32bit compat ioctl on 64bit machine.
9        const FUSE_IOCTL_COMPAT = 1 << 0;
10        /// Not restricted to well-formed ioctls, retry allowed.
11        const FUSE_IOCTL_UNRESTRICTED = 1 << 1;
12        /// Retry with new iovecs.
13        const FUSE_IOCTL_RETRY = 1 << 2;
14        /// 32bit ioctl.
15        const FUSE_IOCTL_32BIT = 1 << 3;
16        /// Is a directory.
17        const FUSE_IOCTL_DIR = 1 << 4;
18        /// x32 compat ioctl on 64bit machine (64bit time_t).
19        const FUSE_IOCTL_COMPAT_X32 = 1 << 5;
20    }
21}
22
23impl Display for IoctlFlags {
24    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
25        Display::fmt(&self.bits(), f)
26    }
27}