23 #ifndef STORAGE_MOUNT_POINT_H 24 #define STORAGE_MOUNT_POINT_H 27 #include "storage/Devices/Device.h" 28 #include "storage/Filesystems/Mountable.h" 59 static std::vector<MountPoint*> get_all(
Devicegraph* devicegraph);
60 static std::vector<const MountPoint*> get_all(
const Devicegraph* devicegraph);
62 const std::string& get_path()
const;
67 void set_path(
const std::string& path);
208 static std::vector<const MountPoint*> find_by_path(
const Devicegraph* devicegraph,
209 const std::string& path);
238 const Impl& get_impl()
const;
249 bool is_mount_point(
const Device* device);
void immediate_deactivate()
Immediately deactivate (unmount) the mount point object.
int get_passno() const
Get the passno field from fstab(5).
void set_passno(int passno)
MountByType get_mount_by() const
Get the mount-by method.
void immediate_activate()
Immediately activate (mount) the mount point.
int get_freq() const
Get the freq field from fstab(5).
void set_default_mount_options()
Set the mount options to the default mount options.
static std::string normalize_path(const std::string &path)
Return normalized form of path.
Definition: MountPoint.h:37
bool is_active() const
Return whether the mount point is active (mounted).
The master container of the libstorage.
Definition: Devicegraph.h:153
Definition: Mountable.h:89
Class to represent a mount point.
Definition: MountPoint.h:48
std::vector< MountByType > possible_mount_bys() const
Returns the possible mount-by methods for the mount point.
static MountPoint * create(Devicegraph *devicegraph, const std::string &path)
An abstract base class of storage devices, and a vertex in the Devicegraph.
Definition: Device.h:75
Filesystem * get_filesystem()
Return the filesystem of mountable of the mount point.
void set_mount_by(MountByType mount_by)
Set the mount-by method.
MountPoint * to_mount_point(Device *device)
Converts pointer to Device to pointer to Mountpoint.
bool is_in_etc_fstab() const
Query whether the mount point is present (probed devicegraph) or will be present (staging devicegraph...
void set_default_mount_by()
Set the mount-by method to the global default, see Storage::get_default_mount_by().
Definition: Filesystem.h:40
bool has_mountable() const
Checks whether the mount point has a mountable.
void set_path(const std::string &path)
Base class for storage exceptions.
Definition: Exception.h:113
void set_active(bool active)
Sets whether the mount point is active (mounted).
void set_mount_type(FsType mount_type)
Set the filesystem type to be used to mount the device.
The storage namespace.
Definition: Actiongraph.h:37
void set_mount_options(const std::vector< std::string > &mount_options)
Set the mount options.
const std::vector< std::string > & get_mount_options() const
Get the mount options.
void set_freq(int freq)
Set the freq field.
void set_in_etc_fstab(bool in_etc_fstab)
Set whether the mount point will be present in /etc/fstab.
FsType get_mount_type() const
Get the filesystem type used to mount the device, as specified in fstab(5) and/or in the mount(8) com...
MountByType
The key by which the mount program identifies a mountable.
Definition: Mountable.h:54
Mountable * get_mountable()
Return the mountable of the mount point.