22 #include <sys/mount.h> 23 #include <sys/types.h> 51 #ifndef MS_SYNCHRONOUS 52 #define MS_SYNCHRONOUS 16 60 #define MS_MANDLOCK 64 64 #define MS_DIRSYNC 128 68 #define MS_NOATIME 1024 72 #define MS_NODIRATIME 2048 88 #define MS_SILENT 32768 92 #define MS_POSIXACL (1 << 16) 96 #define MS_UNBINDABLE (1 << 17) 100 #define MS_PRIVATE (1 << 18) 104 #define MS_SLAVE (1 << 19) 108 #define MS_SHARED (1 << 20) 112 #define MS_RELATIME (1 << 21) 116 #define MS_KERNMOUNT (1 << 22) 120 #define MS_I_VERSION (1 << 23) 123 #ifndef MS_STRICTATIME 124 #define MS_STRICTATIME (1 << 24) 128 #define MS_ACTIVE (1 << 30) 132 #define MS_NOUSER (1 << 31) 147 #ifndef UMOUNT_NOFOLLOW 148 #define UMOUNT_NOFOLLOW 8 153 #define FS_TYPE_AUFS 0x61756673 154 #define FS_TYPE_BTRFS 0x9123683E 155 #define FS_TYPE_CRAMFS 0x28cd3d45 156 #define FS_TYPE_ECRYPTFS 0xf15f 157 #define FS_TYPE_EXTFS 0x0000EF53 158 #define FS_TYPE_F2FS 0xF2F52010 159 #define FS_TYPE_GPFS 0x47504653 160 #define FS_TYPE_JFFS2FS 0x000072b6 161 #define FS_TYPE_JFS 0x3153464a 162 #define FS_TYPE_NFSFS 0x00006969 163 #define FS_TYPE_RAMFS 0x858458f6 164 #define FS_TYPE_REISERFS 0x52654973 165 #define FS_TYPE_SMBFS 0x0000517B 166 #define FS_TYPE_SQUASHFS 0x73717368 167 #define FS_TYPE_TMPFS 0x01021994 168 #define FS_TYPE_VXFS 0xa501fcf5 169 #define FS_TYPE_XFS 0x58465342 170 #define FS_TYPE_ZFS 0x2fc12fc1 171 #define FS_TYPE_OVERLAY 0x794C7630 261 bool hierarchicalSort =
true);
277 const std::string& lines,
278 bool hierarchicalSort =
true);
298 const std::string& _dir,
299 const std::string& _type,
300 const std::string& _opts,
314 bool hasOption(
const std::string& option)
const;
356 const std::string&
target,
365 const std::string&
target,
393 const std::string& device,
const std::string&
target);
std::vector< Entry > entries
Definition: fs.hpp:329
Try< std::string > typeName(uint32_t fsType)
std::string root
Definition: fs.hpp:226
int passno
Definition: fs.hpp:321
std::string dir
Definition: fs.hpp:317
std::string type
Definition: fs.hpp:241
Try< Entry > findByTarget(const std::string &target)
int freq
Definition: fs.hpp:320
dev_t devno
Definition: fs.hpp:224
std::string vfsOptions
Definition: fs.hpp:230
std::string fsOptions
Definition: fs.hpp:233
Try< Nothing > unmount(const std::string &target, int flags=0)
Option< int > shared() const
std::vector< Entry > entries
Definition: fs.hpp:286
Try< Nothing > enter(const std::string &root)
Try< Nothing > chroot(const std::string &directory)
Definition: chroot.hpp:28
Try< Nothing > unmountAll(const std::string &target, int flags=0)
std::string fsname
Definition: fs.hpp:316
Option< int > master() const
std::string opts
Definition: fs.hpp:319
Entry()
Definition: fs.hpp:212
std::string target
Definition: fs.hpp:227
Definition: attributes.hpp:24
static Try< Entry > parse(const std::string &s)
static Try< MountInfoTable > read(const Option< pid_t > &pid=None(), bool hierarchicalSort=true)
std::string optionalFields
Definition: fs.hpp:237
std::string type
Definition: fs.hpp:318
Try< uint32_t > type(const std::string &path)
int id
Definition: fs.hpp:222
Try< bool > supported(const std::string &fsname)
Try< bool > dtypeSupported(const std::string &directory)
Entry()
Definition: fs.hpp:295
Try< Nothing > mount(const Option< std::string > &source, const std::string &target, const Option< std::string > &type, unsigned long flags, const void *data)
Try< Nothing > copyDeviceNode(const std::string &device, const std::string &target)
Entry(const std::string &_fsname, const std::string &_dir, const std::string &_type, const std::string &_opts, int _freq, int _passno)
Definition: fs.hpp:297
Try< Nothing > pivot_root(const std::string &newRoot, const std::string &putOld)
std::string source
Definition: fs.hpp:242
int parent
Definition: fs.hpp:223