libstorage-ng
Classes | Typedefs | Enumerations | Functions | Variables
storage Namespace Reference

The storage namespace. More...

Classes

class  Aborted
 
class  Actiongraph
 
class  ActivateCallbacks
 Other storage subsystems are activated automatically, e.g. More...
 
class  AlignError
 
class  Alignment
 A class to calculate partition alignment based on hardware topology. More...
 
class  Bcache
 A bcache device. More...
 
class  BcacheCset
 A bcache cache set. More...
 
class  BlkDevice
 An abstract Block Device. More...
 
class  BlkFilesystem
 
class  Btrfs
 
class  BtrfsSubvolume
 Class to represent a btrfs subvolume. More...
 
class  BtrfsSubvolumeNotFoundByPath
 
class  CheckCallbacks
 
class  CodeLocation
 Helper class for UI exceptions: Store BASE_FILE, FUNCTION and LINE. More...
 
class  CommitCallbacks
 
class  ContentInfo
 
class  Dasd
 A physical DASD device. More...
 
class  DasdPt
 
struct  DeactivateStatus
 Provides information whether deactivate() was able to deactivate subsystems. More...
 
class  Device
 An abstract base class of storage devices, and a vertex in the Devicegraph. More...
 
class  Devicegraph
 The master container of the libstorage. More...
 
class  DeviceHasWrongType
 
class  DeviceNotFound
 
class  DeviceNotFoundByName
 
class  DeviceNotFoundBySid
 
class  DeviceNotFoundByUuid
 
class  DifferentBlockSizes
 
class  Disk
 A physical disk device. More...
 
class  DmRaid
 A DM RAID device. More...
 
class  Encryption
 An encryption layer on a blk device. More...
 
class  Environment
 
class  Exception
 Base class for storage exceptions. More...
 
class  Ext
 Abstract base class for Ext2, Ext3 and Ext4. More...
 
class  Ext2
 
class  Ext3
 
class  Ext4
 
class  Filesystem
 
class  FilesystemUser
 
class  Gpt
 
class  Holder
 
class  HolderAlreadyExists
 
class  HolderHasWrongType
 
class  HolderNotFound
 
class  HolderNotFoundBySids
 
class  ImplicitPt
 Class to represent implicit partition table. More...
 
class  IndexOutOfRangeException
 Exception class for "index out of range". More...
 
class  InvalidBlockSize
 
class  InvalidExtentSize
 
class  InvalidMountPointPath
 
class  IOException
 Exception class for IO errors. More...
 
class  Iso9660
 Class for ISO9660 filesystem. More...
 
class  Jfs
 
class  LockException
 Exception indicating that getting the lock failed. More...
 
class  Logger
 The Logger class. More...
 
class  LogicException
 Exception class for faulty logic within the program. More...
 
class  Luks
 An luks encryption layer on a block device. More...
 
class  LvmLv
 A Logical Volume of the Logical Volume Manager (LVM). More...
 
class  LvmLvNotFoundByLvName
 
class  LvmPv
 
class  LvmVg
 A Volume Group of the Logical Volume Manager (LVM). More...
 
class  LvmVgNotFoundByVgName
 
class  Md
 A MD device. More...
 
class  MdContainer
 A MD Container. More...
 
class  MdMember
 A MD member. More...
 
class  MdSubdevice
 Holder from a MdContainer to a MdMember. More...
 
class  MdUser
 
class  Mountable
 
class  MountPoint
 Class to represent a mount point. More...
 
class  Msdos
 
class  Multipath
 A multipath device. More...
 
class  Nfs
 Class to represent a NFS mount. More...
 
class  NfsNotFoundByServerAndPath
 
class  NoIntersection
 
class  NotInside
 
class  Ntfs
 
class  NullPointerException
 Exception class for generic null pointer exceptions. More...
 
class  OutOfMemoryException
 Exception class for "out of memory". More...
 
class  OverflowException
 Exception class for "overflow". More...
 
class  ParseException
 Exception class for parse errors, e.g. More...
 
class  Partition
 A partition of a Partitionable, e.g. Disk or Md. More...
 
class  Partitionable
 
class  PartitionSlot
 Number and name are only valid if one of the possible flags is true. More...
 
class  PartitionTable
 
class  ProbeCallbacks
 
class  Region
 A start/length pair with a block size. More...
 
class  Reiserfs
 
class  RemoteCallbacks
 
struct  RemoteCommand
 A result of an unnamed command: stdout + stderr + exit_code. More...
 
struct  RemoteFile
 Contents of an unnamed file (vector of lines) More...
 
class  ResizeInfo
 
class  Silencer
 Class to make some exceptions log-level DEBUG instead of WARNING. More...
 
struct  SimpleEtcCrypttabEntry
 A simple struct to hold the information from one line in crypttab. More...
 
struct  SimpleEtcFstabEntry
 A simple struct to hold the information from one line in fstab. More...
 
class  SpaceInfo
 
class  Storage
 The main entry point to libstorage. More...
 
class  StrayBlkDevice
 This class represents stray block devices. More...
 
class  Subdevice
 
class  Swap
 
class  Topology
 A class to represent hardware alignment information. More...
 
class  Udf
 Class for UDF filesystem. More...
 
class  UnsupportedException
 Exception class for unsupported features and operations. More...
 
class  User
 
class  Vfat
 
class  WrongNumberOfChildren
 
class  WrongNumberOfParents
 
class  Xfs
 

Typedefs

typedef unsigned int sid_t
 An integer storage ID. More...
 

Enumerations

enum  Side { LHS, RHS }
 
enum  ProbeMode {
  STANDARD, STANDARD_WRITE_DEVICEGRAPH, STANDARD_WRITE_MOCKUP, NONE,
  READ_DEVICEGRAPH, READ_MOCKUP
}
 How to probe the system.
 
enum  TargetMode { DIRECT, CHROOT, IMAGE }
 Is the target a disk, chroot, or image?
 
enum  : uint32_t {
  RB_RESIZE_NOT_SUPPORTED_BY_DEVICE = 1 << 0, RB_MIN_MAX_ERROR = 1 << 1, RB_SHRINK_NOT_SUPPORTED_BY_FILESYSTEM = 1 << 2, RB_GROW_NOT_SUPPORTED_BY_FILESYSTEM = 1 << 3,
  RB_FILESYSTEM_INCONSISTENT = 1 << 4, RB_MIN_SIZE_FOR_FILESYSTEM = 1 << 5, RB_MAX_SIZE_FOR_FILESYSTEM = 1 << 6, RB_FILESYSTEM_FULL = 1 << 7,
  RB_NO_SPACE_BEHIND_PARTITION = 1 << 8, RB_MIN_SIZE_FOR_PARTITION = 1 << 9, RB_EXTENDED_PARTITION = 1 << 10, RB_ON_IMPLICIT_PARTITION_TABLE = 1 << 11,
  RB_SHRINK_NOT_SUPPORTED_FOR_LVM_LV_TYPE = 1 << 12, RB_RESIZE_NOT_SUPPORTED_FOR_LVM_LV_TYPE = 1 << 13, RB_NO_SPACE_IN_LVM_VG = 1 << 14, RB_MIN_SIZE_FOR_LVM_LV = 1 << 15,
  RB_MAX_SIZE_FOR_LVM_LV_THIN = 1 << 16
}
 Resize blockers. More...
 
enum  GraphvizFlags : unsigned int {
  NONE = 0, CLASSNAME = 1 << 0, PRETTY_CLASSNAME = 1 << 1, NAME = 1 << 2,
  SID = 1 << 3, SIZE = 1 << 4, ACTIVE = 1 << 5, IN_ETC = 1 << 6,
  DISPLAYNAME = 1 << 7
}
 Bitfield to control graphviz output. More...
 
enum  : uint64_t {
  UF_EXT2 = 1 << 0, UF_EXT3 = 1 << 1, UF_EXT4 = 1 << 2, UF_BTRFS = 1 << 3,
  UF_XFS = 1 << 4, UF_REISERFS = 1 << 5, UF_SWAP = 1 << 6, UF_NTFS = 1 << 7,
  UF_VFAT = 1 << 8, UF_NFS = 1 << 9, UF_JFS = 1 << 10, UF_LUKS = 1 << 11,
  UF_LVM = 1 << 12, UF_MDRAID = 1 << 13, UF_DMRAID = 1 << 14, UF_MULTIPATH = 1 << 15,
  UF_BCACHE = 1 << 16, UF_ISCSI = 1 << 17, UF_FCOE = 1 << 18, UF_FC = 1 << 19,
  UF_DASD = 1 << 20, UF_QUOTA = 1 << 21, UF_SNAPSHOTS = 1 << 22
}
 
enum  DasdType { UNKNOWN, ECKD, FBA }
 The DASD type.
 
enum  DasdFormat { NONE, LDL, CDL }
 The layout with which the ECKD DASD was formatted.
 
enum  Transport {
  UNKNOWN, SBP, ATA, FC,
  ISCSI, SAS, SATA, SPI,
  USB, FCOE
}
 Data Transport Layer.
 
enum  EncryptionType {
  NONE, TWOFISH, TWOFISH_OLD, TWOFISH256_OLD,
  LUKS, UNKNOWN
}
 
enum  LvType {
  UNKNOWN, NORMAL, THIN_POOL, THIN,
  RAID
}
 LVM logical volume types, see lvs(8).
 
enum  MdLevel {
  UNKNOWN, RAID0, RAID1, RAID4,
  RAID5, RAID6, RAID10, CONTAINER
}
 
enum  MdParity {
  DEFAULT, LEFT_ASYMMETRIC, LEFT_SYMMETRIC, RIGHT_ASYMMETRIC,
  RIGHT_SYMMETRIC, FIRST, LAST, LEFT_ASYMMETRIC_6,
  LEFT_SYMMETRIC_6, RIGHT_ASYMMETRIC_6, RIGHT_SYMMETRIC_6, FIRST_6,
  NEAR_2, OFFSET_2, FAR_2, NEAR_3,
  OFFSET_3, FAR_3
}
 
enum  PartitionType { PRIMARY, EXTENDED, LOGICAL }
 Partition type (primary, extended, logical)
 
enum  IdNum : unsigned int {
  ID_DOS12 = 0x01, ID_DOS16 = 0x06, ID_DOS32 = 0x0c, ID_NTFS = 0x07,
  ID_EXTENDED = 0x0f, ID_DIAG = 0x12, ID_PREP = 0x41, ID_LINUX = 0x83,
  ID_SWAP = 0x82, ID_LVM = 0x8e, ID_RAID = 0xfd, ID_ESP = 0xef,
  ID_UNKNOWN = 0x100, ID_BIOS_BOOT = 0x101, ID_WINDOWS_BASIC_DATA = 0x102, ID_MICROSOFT_RESERVED = 0x103
}
 Enum with values used as partition ids. More...
 
enum  PtType {
  UNKNOWN, LOOP, MSDOS, GPT,
  DASD, MAC, IMPLICIT
}
 Partition Table Type.
 
enum  FsType {
  UNKNOWN, AUTO, REISERFS, EXT2,
  EXT3, EXT4, BTRFS, VFAT,
  XFS, JFS, HFS, NTFS,
  SWAP, HFSPLUS, NFS, NFS4,
  TMPFS, ISO9660, UDF, NILFS2,
  MINIX, NTFS3G
}
 
enum  MountByType {
  MountByType::DEVICE, MountByType::UUID, MountByType::LABEL, MountByType::ID,
  MountByType::PATH
}
 The key by which the mount program identifies a mountable. More...
 
enum  AlignType { AlignType::REQUIRED, AlignType::OPTIMAL }
 
enum  AlignPolicy {
  AlignPolicy::ALIGN_START_AND_END = 0, ST_DEPRECATED = 0, AlignPolicy::ALIGN_START_KEEP_END = 1, ST_DEPRECATED = 1,
  AlignPolicy::ALIGN_START_KEEP_SIZE = 2, ST_DEPRECATED = 2, AlignPolicy::KEEP_START_ALIGN_END = 3
}
 
enum  LogLevel { DEBUG = 0, MILESTONE = 1, WARNING = 2, ERROR = 3 }
 

Functions

GraphvizFlags operator| (GraphvizFlags a, GraphvizFlags b)
 
GraphvizFlags operator & (GraphvizFlags a, GraphvizFlags b)
 
bool operator && (GraphvizFlags a, GraphvizFlags b)
 
std::vector< SimpleEtcCrypttabEntryread_simple_etc_crypttab (const std::string &filename)
 Read a crypttab file. More...
 
std::vector< SimpleEtcFstabEntryread_simple_etc_fstab (const std::string &filename)
 Read a fstab file. More...
 
bool is_bcache (const Device *device)
 
Bcacheto_bcache (Device *device)
 Converts pointer to Device to pointer to Bcache. More...
 
const Bcacheto_bcache (const Device *device)
 Converts pointer to Device to pointer to Bcache. More...
 
bool is_bcache_cset (const Device *device)
 
BcacheCsetto_bcache_cset (Device *device)
 Converts pointer to Device to pointer to BcacheCset. More...
 
const BcacheCsetto_bcache_cset (const Device *device)
 Converts pointer to Device to pointer to BcacheCset. More...
 
bool is_blk_device (const Device *device)
 
BlkDeviceto_blk_device (Device *device)
 Converts pointer to Device to pointer to BlkDevice. More...
 
const BlkDeviceto_blk_device (const Device *device)
 Converts pointer to Device to pointer to BlkDevice. More...
 
bool is_dasd (const Device *device)
 
Dasdto_dasd (Device *device)
 Converts pointer to Device to pointer to Dasd. More...
 
const Dasdto_dasd (const Device *device)
 Converts pointer to Device to pointer to Dasd. More...
 
bool is_dasd_pt (const Device *device)
 
DasdPtto_dasd_pt (Device *device)
 Converts pointer to Device to pointer to DasdPt. More...
 
const DasdPtto_dasd_pt (const Device *device)
 Converts pointer to Device to pointer to DasdPt. More...
 
std::string get_transport_name (Transport transport)
 
bool is_disk (const Device *device)
 
Diskto_disk (Device *device)
 Converts pointer to Device to pointer to Disk. More...
 
const Diskto_disk (const Device *device)
 Converts pointer to Device to pointer to Disk. More...
 
bool is_dm_raid (const Device *device)
 
DmRaidto_dm_raid (Device *device)
 Converts pointer to Device to pointer to DmRaid. More...
 
const DmRaidto_dm_raid (const Device *device)
 Converts pointer to Device to pointer to DmRaid. More...
 
bool is_encryption (const Device *device)
 
Encryptionto_encryption (Device *device)
 Converts pointer to Device to pointer to Encryption. More...
 
const Encryptionto_encryption (const Device *device)
 Converts pointer to Device to pointer to Encryption. More...
 
bool is_gpt (const Device *device)
 
Gptto_gpt (Device *device)
 Converts pointer to Device to pointer to Gpt. More...
 
const Gptto_gpt (const Device *device)
 Converts pointer to Device to pointer to Gpt. More...
 
bool is_implicit_pt (const Device *device)
 
ImplicitPtto_implicit_pt (Device *device)
 Converts pointer to Device to pointer to ImplicitPt. More...
 
const ImplicitPtto_implicit_pt (const Device *device)
 Converts pointer to Device to pointer to ImplicitPt. More...
 
bool is_luks (const Device *device)
 
Luksto_luks (Device *device)
 Converts pointer to Device to pointer to Luks. More...
 
const Luksto_luks (const Device *device)
 Converts pointer to Device to pointer to Luks. More...
 
bool is_lvm_lv (const Device *device)
 
LvmLvto_lvm_lv (Device *device)
 Converts pointer to Device to pointer to LvmLv. More...
 
const LvmLvto_lvm_lv (const Device *device)
 Converts pointer to Device to pointer to LvmLv. More...
 
bool is_lvm_pv (const Device *device)
 
LvmPvto_lvm_pv (Device *device)
 Converts pointer to Device to pointer to LvmPv. More...
 
const LvmPvto_lvm_pv (const Device *device)
 Converts pointer to Device to pointer to LvmPv. More...
 
bool is_lvm_vg (const Device *device)
 
LvmVgto_lvm_vg (Device *device)
 Converts pointer to Device to pointer to LvmVg. More...
 
const LvmVgto_lvm_vg (const Device *device)
 Converts pointer to Device to pointer to LvmVg. More...
 
std::string get_md_level_name (MdLevel md_level)
 
std::string get_md_parity_name (MdParity md_parity)
 
bool is_md (const Device *device)
 
Mdto_md (Device *device)
 Converts pointer to Device to pointer to Md. More...
 
const Mdto_md (const Device *device)
 Converts pointer to Device to pointer to Md. More...
 
bool is_md_container (const Device *device)
 
MdContainerto_md_container (Device *device)
 Converts pointer to Device to pointer to MdContainer. More...
 
const MdContainerto_md_container (const Device *device)
 Converts pointer to Device to pointer to MdContainer. More...
 
bool is_md_member (const Device *device)
 
MdMemberto_md_member (Device *device)
 Converts pointer to Device to pointer to MdMember. More...
 
const MdMemberto_md_member (const Device *device)
 Converts pointer to Device to pointer to MdMember. More...
 
bool is_msdos (const Device *device)
 
Msdosto_msdos (Device *device)
 Converts pointer to Device to pointer to Msdos. More...
 
const Msdosto_msdos (const Device *device)
 Converts pointer to Device to pointer to Msdos. More...
 
bool is_multipath (const Device *device)
 
Multipathto_multipath (Device *device)
 Converts pointer to Device to pointer to Multipath. More...
 
const Multipathto_multipath (const Device *device)
 Converts pointer to Device to pointer to Multipath. More...
 
std::string get_partition_type_name (PartitionType partition_type)
 
bool is_partition (const Device *device)
 
Partitionto_partition (Device *device)
 Converts pointer to Device to pointer to Partition. More...
 
const Partitionto_partition (const Device *device)
 Converts pointer to Device to pointer to Partition. More...
 
bool is_partitionable (const Device *device)
 
Partitionableto_partitionable (Device *device)
 Converts pointer to Device to pointer to Partitionable. More...
 
const Partitionableto_partitionable (const Device *device)
 Converts pointer to Device to pointer to Partitionable. More...
 
std::string get_pt_type_name (PtType pt_type)
 
bool is_partition_table (const Device *device)
 
PartitionTableto_partition_table (Device *device)
 Converts pointer to Device to pointer to PartitionTable. More...
 
const PartitionTableto_partition_table (const Device *device)
 Converts pointer to Device to pointer to PartitionTable. More...
 
bool is_stray_blk_device (const Device *device)
 
StrayBlkDeviceto_stray_blk_device (Device *device)
 Converts pointer to Device to pointer to StrayBlkDevice. More...
 
const StrayBlkDeviceto_stray_blk_device (const Device *device)
 Converts pointer to Device to pointer to StrayBlkDevice. More...
 
bool is_blk_filesystem (const Device *device)
 
BlkFilesystemto_blk_filesystem (Device *device)
 Converts pointer to Device to pointer to BlkFilesystem. More...
 
const BlkFilesystemto_blk_filesystem (const Device *device)
 Converts pointer to Device to pointer to BlkFilesystem. More...
 
bool is_btrfs (const Device *device)
 
Btrfsto_btrfs (Device *device)
 Converts pointer to Device to pointer to Btrfs. More...
 
const Btrfsto_btrfs (const Device *device)
 Converts pointer to Device to pointer to Btrfs. More...
 
bool is_btrfs_subvolume (const Device *device)
 
BtrfsSubvolumeto_btrfs_subvolume (Device *device)
 Converts pointer to Device to pointer to BtrfsSubvolume. More...
 
const BtrfsSubvolumeto_btrfs_subvolume (const Device *device)
 Converts pointer to Device to pointer to BtrfsSubvolume. More...
 
bool is_ext (const Device *device)
 
Extto_ext (Device *device)
 Converts pointer to Device to pointer to Ext. More...
 
const Extto_ext (const Device *device)
 Converts pointer to Device to pointer to Ext. More...
 
bool is_ext2 (const Device *device)
 
Ext2to_ext2 (Device *device)
 Converts pointer to Device to pointer to Ext2. More...
 
const Ext2to_ext2 (const Device *device)
 Converts pointer to Device to pointer to Ext2. More...
 
bool is_ext3 (const Device *device)
 
Ext3to_ext3 (Device *device)
 Converts pointer to Device to pointer to Ext3. More...
 
const Ext3to_ext3 (const Device *device)
 Converts pointer to Device to pointer to Ext3. More...
 
bool is_ext4 (const Device *device)
 
Ext4to_ext4 (Device *device)
 Converts pointer to Device to pointer to Ext4. More...
 
const Ext4to_ext4 (const Device *device)
 Converts pointer to Device to pointer to Ext4. More...
 
bool is_filesystem (const Device *device)
 
Filesystemto_filesystem (Device *device)
 Converts pointer to Device to pointer to Filesystem. More...
 
const Filesystemto_filesystem (const Device *device)
 Converts pointer to Device to pointer to Filesystem. More...
 
bool is_iso9660 (const Device *device)
 
Iso9660to_iso9660 (Device *device)
 Converts pointer to Device to pointer to Iso9660. More...
 
const Iso9660to_iso9660 (const Device *device)
 Converts pointer to Device to pointer to Iso9660. More...
 
bool is_jfs (const Device *device)
 
Jfsto_jfs (Device *device)
 Converts pointer to Device to pointer to Jfs. More...
 
const Jfsto_jfs (const Device *device)
 Converts pointer to Device to pointer to Jfs. More...
 
std::string get_fs_type_name (FsType fs_type)
 
std::string get_mount_by_name (MountByType mount_by_type)
 
bool is_mountable (const Device *device)
 
Mountableto_mountable (Device *device)
 Converts pointer to Device to pointer to Mountable. More...
 
const Mountableto_mountable (const Device *device)
 Converts pointer to Device to pointer to Mountable. More...
 
bool is_mount_point (const Device *device)
 
MountPointto_mount_point (Device *device)
 Converts pointer to Device to pointer to Mountpoint. More...
 
const MountPointto_mount_point (const Device *device)
 Converts pointer to Device to pointer to Mountpoint. More...
 
bool is_nfs (const Device *device)
 
Nfsto_nfs (Device *device)
 Converts pointer to Device to pointer to Nfs. More...
 
const Nfsto_nfs (const Device *device)
 Converts pointer to Device to pointer to Nfs. More...
 
bool is_ntfs (const Device *device)
 
Ntfsto_ntfs (Device *device)
 Converts pointer to Device to pointer to Ntfs. More...
 
const Ntfsto_ntfs (const Device *device)
 Converts pointer to Device to pointer to Ntfs. More...
 
bool is_reiserfs (const Device *device)
 
Reiserfsto_reiserfs (Device *device)
 Converts pointer to Device to pointer to Reiserfs. More...
 
const Reiserfsto_reiserfs (const Device *device)
 Converts pointer to Device to pointer to Reiserfs. More...
 
bool is_swap (const Device *device)
 
Swapto_swap (Device *device)
 Converts pointer to Device to pointer to Swap. More...
 
const Swapto_swap (const Device *device)
 Converts pointer to Device to pointer to Swap. More...
 
bool is_udf (const Device *device)
 
Udfto_udf (Device *device)
 Converts pointer to Device to pointer to Udf. More...
 
const Udfto_udf (const Device *device)
 Converts pointer to Device to pointer to Udf. More...
 
bool is_vfat (const Device *device)
 
Vfatto_vfat (Device *device)
 Converts pointer to Device to pointer to Vfat. More...
 
const Vfatto_vfat (const Device *device)
 Converts pointer to Device to pointer to Vfat. More...
 
bool is_xfs (const Device *device)
 
Xfsto_xfs (Device *device)
 Converts pointer to Device to pointer to Xfs. More...
 
const Xfsto_xfs (const Device *device)
 Converts pointer to Device to pointer to Xfs. More...
 
bool is_filesystem_user (const Holder *holder)
 
FilesystemUserto_filesystem_user (Holder *holder)
 Converts pointer to Holder to pointer to FilesystemUser. More...
 
const FilesystemUserto_filesystem_user (const Holder *holder)
 Converts pointer to Holder to pointer to FilesystemUser. More...
 
bool is_md_subdevice (const Holder *holder)
 
MdSubdeviceto_md_subdevice (Holder *holder)
 Converts pointer to Holder to pointer to MdSubdevice. More...
 
const MdSubdeviceto_md_subdevice (const Holder *holder)
 Converts pointer to Holder to pointer to MdSubdevice. More...
 
bool is_md_user (const Holder *holder)
 
MdUserto_md_user (Holder *holder)
 Converts pointer to Holder to pointer to MdUser. More...
 
const MdUserto_md_user (const Holder *holder)
 Converts pointer to Holder to pointer to MdUser. More...
 
bool is_subdevice (const Holder *holder)
 
Subdeviceto_subdevice (Holder *holder)
 Converts pointer to Holder to pointer to Subdevice. More...
 
const Subdeviceto_subdevice (const Holder *holder)
 Converts pointer to Holder to pointer to User. More...
 
bool is_user (const Holder *holder)
 
Userto_user (Holder *holder)
 Converts pointer to Holder to pointer to User. More...
 
const Userto_user (const Holder *holder)
 Converts pointer to Holder to pointer to User. More...
 
std::ostream & operator<< (std::ostream &str, const CodeLocation &obj)
 CodeLocation stream output. More...
 
std::ostream & operator<< (std::ostream &str, const Exception &obj)
 Exception stream output.
 
int num_suffixes ()
 Return number of suffixes. More...
 
std::string get_suffix (int i, bool classic)
 Return a suffix. More...
 
std::string byte_to_humanstring (unsigned long long size, bool classic, int precision, bool omit_zeroes)
 Return a pretty description of a size with required precision and using B, KiB, MiB, GiB, TiB, PiB or EiB as unit as appropriate. More...
 
unsigned long long humanstring_to_byte (const std::string &str, bool classic)
 Converts a size description using B, KiB, KB, MiB, MB, GiB, GB, TiB, TB, PiB, PB, EiB or EB into an integer. More...
 
bool light_probe ()
 This function does some very light probing and returns true iff some disks or DASDs were found in the system. More...
 
Loggerget_logger ()
 Get the current logger object.
 
void set_logger (Logger *logger)
 Set the current logger object. More...
 
Loggerget_stdout_logger ()
 Returns a Logger that logs to stdout. More...
 
Loggerget_logfile_logger (const std::string &filename="/var/log/libstorage.log")
 Returns a Logger that logs to the standard libstorage log file ("/var/log/libstorage.log") or to a given file. More...
 
const RemoteCallbacksget_remote_callbacks ()
 
void set_remote_callbacks (const RemoteCallbacks *remote_callbacks)
 

Variables

const unsigned long long B = 1
 
const unsigned long long KiB = 1024 * B
 
const unsigned long long MiB = 1024 * KiB
 
const unsigned long long GiB = 1024 * MiB
 
const unsigned long long TiB = 1024 * GiB
 
const unsigned long long PiB = 1024 * TiB
 
const unsigned long long EiB = 1024 * PiB
 

Detailed Description

The storage namespace.

Typedef Documentation

◆ sid_t

typedef unsigned int storage::sid_t

An integer storage ID.

The storage id (sid) is used to identify devices. The sid is copied when copying the device graph. When adding a device it gets a unique sid (across all device graphs). By using the storage id instead of a device name we can easily identify devices where the device name changed, e.g. renumbered logical partitions or renamed logical volumes. Also some devices do not have a intrinsic device name, e.g. btrfs. We could even have objects for unused space, e.g. space between partitions or unallocated space of a volume group.

Whenever possible use the storage id to find objects instead of e.g. the name since only the storage id guarantees uniqueness.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : uint32_t

Resize blockers.

Some resize operations are not supported by the system (e.g. shrink LVM thin pool) while others are not supported by the library (e.g. resize extended partition).

Enumerator
RB_RESIZE_NOT_SUPPORTED_BY_DEVICE 

The device or one of its descendants that also needs resizing does not support resizing.

This is the case for Disks, Dasds, Mds, DmRaids, Multipaths, PartitionTables, LvmVgs, Bcaches, BcacheCsets, BtrfsSubvolumes, Nfses MountPoints, so basically everything except Partitions, LvmLvs and Lukses.

Blocks shrink and grow.

RB_MIN_MAX_ERROR 

Several limitations were combined, e.g.

limitations from partition and filesystem, and the result does not allow any resize.

Blocks shrink and grow.

RB_SHRINK_NOT_SUPPORTED_BY_FILESYSTEM 

The filesystem does not support shrink.

Blocks shrink.

RB_GROW_NOT_SUPPORTED_BY_FILESYSTEM 

The filesystem does not support grow.

Blocks grow.

RB_FILESYSTEM_INCONSISTENT 

The filesystem seems to be inconsistent or checking filesystem consistency failed.

Blocks shrink and grow.

RB_MIN_SIZE_FOR_FILESYSTEM 

The filesystem has already the minimal possible size.

Blocks shrink.

RB_MAX_SIZE_FOR_FILESYSTEM 

The filesystem has already the maximal possible size.

Blocks grow.

RB_FILESYSTEM_FULL 

The filesystem is full and cannot be shrunk.

Blocks shrink.

RB_NO_SPACE_BEHIND_PARTITION 

No space behind partition.

There can be several reasons: 1. other partition, 2. end of disk, 3. end of extended partition, 4. space not addressable by partition table.

Blocks grow.

RB_MIN_SIZE_FOR_PARTITION 

The partition has already the minimal possible size.

Blocks shrink.

RB_EXTENDED_PARTITION 

Extended partitions cannot be resized.

Blocks shrink and grow.

RB_ON_IMPLICIT_PARTITION_TABLE 

Partition on an implicit partition table cannot be resized.

Blocks shrink and grow.

RB_SHRINK_NOT_SUPPORTED_FOR_LVM_LV_TYPE 

Shrink of LVM logical volume of this type not supported, e.g.

thin pools and raids.

Blocks shrink.

RB_RESIZE_NOT_SUPPORTED_FOR_LVM_LV_TYPE 

Resize of LVM logical volume of this type not supported, e.g.

raids.

Blocks shrink and grow.

RB_NO_SPACE_IN_LVM_VG 

No space left in LVM volume group.

Blocks grow.

RB_MIN_SIZE_FOR_LVM_LV 

The LVM logical volume has already the minimal possible size.

Blocks shrink.

RB_MAX_SIZE_FOR_LVM_LV_THIN 

LVM thin logical volume has already maximal size.

Blocks grow.

◆ AlignPolicy

enum storage::AlignPolicy
strong
Enumerator
ALIGN_START_AND_END 

Align start and end.

ALIGN_START_KEEP_END 

Align start and keep end.

ALIGN_START_KEEP_SIZE 

Align start and keep size.

KEEP_START_ALIGN_END 

Keep start and align end.

◆ AlignType

enum storage::AlignType
strong
Enumerator
REQUIRED 

Only align to hard requirements.

OPTIMAL 

Align to topology information.

◆ GraphvizFlags

enum storage::GraphvizFlags : unsigned int
strong

Bitfield to control graphviz output.

Not all flags apply to all graphs or all objects (devices, holders and actions).

◆ IdNum

enum storage::IdNum : unsigned int

Enum with values used as partition ids.

For MS-DOS the value of the enum is equal to the partition type byte. For GPT, DASD and Implicit the value has no special meaning.

For MS-DOS any value between 0 and 255 is possible, while for the other partition tables only those specified are possible.

For details about the ids see e.g. https://en.wikipedia.org/wiki/Partition_type and https://en.wikipedia.org/wiki/GUID_Partition_Table.

Enumerator
ID_DOS12 

Only for MS-DOS.

ID_DOS16 

Only for MS-DOS.

ID_DOS32 

Only for MS-DOS.

ID_NTFS 

Only for MS-DOS.

ID_EXTENDED 

Only for MS-DOS.

ID_DIAG 

For MS-DOS and GPT.

ID_PREP 

PPC PReP Boot partition, for MS-DOS and GPT.

ID_LINUX 

For MS-DOS, GPT, DASD and implicit.

ID_SWAP 

Swap partition, for MS-DOS, GPT and DASD.

ID_LVM 

LVM partition, for MS-DOS, GPT and DASD.

ID_RAID 

RAID partition, for MS-DOS, GPT and DASD.

ID_ESP 

EFI System Partition, for MS-DOS and GPT.

ID_UNKNOWN 

Only set during probing.

For MS-DOS, GPT, DASD and implicit.

ID_BIOS_BOOT 

BIOS boot partition (https://en.wikipedia.org/wiki/BIOS_boot_partition), only for GPT.

ID_WINDOWS_BASIC_DATA 

Windows basic data partition, only for GPT.

ID_MICROSOFT_RESERVED 

Microsoft reserved partition, only for GPT.

◆ MountByType

enum storage::MountByType
strong

The key by which the mount program identifies a mountable.

Some types address the filesystem while others address the underlying device.

Enumerator
DEVICE 

The kernel device name or a link in /dev (but not in /dev/disk).

For NFS the server and path.

UUID 

Filesystem UUID.

LABEL 

Filesystem label.

ID 

One of the links in /dev/disk/by-id.

PATH 

One of the links in /dev/disk/by-path.

Function Documentation

◆ byte_to_humanstring()

std::string storage::byte_to_humanstring ( unsigned long long  size,
bool  classic,
int  precision,
bool  omit_zeroes 
)

Return a pretty description of a size with required precision and using B, KiB, MiB, GiB, TiB, PiB or EiB as unit as appropriate.

Supported range is 0 B to (16 EiB - 1 B).

Parameters
sizesize in bytes
classicuse classic locale instead of global C++ locale
precisionnumber of fraction digits in output
omit_zeroesif true omit trailing zeroes for exact values
Returns
formatted string

◆ get_logfile_logger()

Logger* storage::get_logfile_logger ( const std::string &  filename = "/var/log/libstorage.log")

Returns a Logger that logs to the standard libstorage log file ("/var/log/libstorage.log") or to a given file.

Do not use this function for production code but only for examples and test-cases.

Note that this method only uses the given filename the first time that is called.

◆ get_stdout_logger()

Logger* storage::get_stdout_logger ( )

Returns a Logger that logs to stdout.

Do not use this function for production code but only for examples and test-cases.

◆ get_suffix()

std::string storage::get_suffix ( int  i,
bool  classic 
)

Return a suffix.

Parameters
iindex of suffix
classicuse classic locale instead of global C++ locale
Returns
suffix

◆ humanstring_to_byte()

unsigned long long storage::humanstring_to_byte ( const std::string &  str,
bool  classic 
)

Converts a size description using B, KiB, KB, MiB, MB, GiB, GB, TiB, TB, PiB, PB, EiB or EB into an integer.

Decimal suffixes are treated as binary. Supported range is 0 B to (16 EiB - 1 B).

Parameters
strsize string
classicuse classic locale instead of global C++ locale
Returns
true on successful conversion

The conversion is always case-insensitive. With classic set to false the conversion is also sloppy concerning omission of 'B'.

Exceptions
ParseException,OverflowException

◆ light_probe()

bool storage::light_probe ( )

This function does some very light probing and returns true iff some disks or DASDs were found in the system.

No devicegraph is generated. The exact type of devices probed may change.

Exceptions
Exception

◆ num_suffixes()

int storage::num_suffixes ( )

Return number of suffixes.

Returns
number of suffixes

◆ operator<<()

std::ostream& storage::operator<< ( std::ostream &  str,
const CodeLocation obj 
)

CodeLocation stream output.

Stream output.

◆ read_simple_etc_crypttab()

std::vector<SimpleEtcCrypttabEntry> storage::read_simple_etc_crypttab ( const std::string &  filename)

Read a crypttab file.

Whether the function returns an empty vector or throws an exception if reading or parsing is undefined.

Exceptions
Exception

◆ read_simple_etc_fstab()

std::vector<SimpleEtcFstabEntry> storage::read_simple_etc_fstab ( const std::string &  filename)

Read a fstab file.

Whether the function returns an empty vector or throws an exception if reading or parsing is undefined.

Exceptions
Exception

◆ set_logger()

void storage::set_logger ( Logger logger)

Set the current logger object.

The logger object must be valid until replaced by another logger object.

◆ to_bcache() [1/2]

Bcache* storage::to_bcache ( Device device)

Converts pointer to Device to pointer to Bcache.

Returns
Pointer to Bcache.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_bcache() [2/2]

const Bcache* storage::to_bcache ( const Device device)

Converts pointer to Device to pointer to Bcache.

Returns
Pointer to Bcache.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_bcache_cset() [1/2]

BcacheCset* storage::to_bcache_cset ( Device device)

Converts pointer to Device to pointer to BcacheCset.

Returns
Pointer to BcacheCset.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_bcache_cset() [2/2]

const BcacheCset* storage::to_bcache_cset ( const Device device)

Converts pointer to Device to pointer to BcacheCset.

Returns
Pointer to BcacheCset.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_blk_device() [1/2]

BlkDevice* storage::to_blk_device ( Device device)

Converts pointer to Device to pointer to BlkDevice.

Returns
Pointer to BlkDevice.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_blk_device() [2/2]

const BlkDevice* storage::to_blk_device ( const Device device)

Converts pointer to Device to pointer to BlkDevice.

Returns
Pointer to BlkDevice.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_blk_filesystem() [1/2]

BlkFilesystem* storage::to_blk_filesystem ( Device device)

Converts pointer to Device to pointer to BlkFilesystem.

Returns
Pointer to BlkFilesystem.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_blk_filesystem() [2/2]

const BlkFilesystem* storage::to_blk_filesystem ( const Device device)

Converts pointer to Device to pointer to BlkFilesystem.

Returns
Pointer to BlkFilesystem.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_btrfs() [1/2]

Btrfs* storage::to_btrfs ( Device device)

Converts pointer to Device to pointer to Btrfs.

Returns
Pointer to Btrfs.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_btrfs() [2/2]

const Btrfs* storage::to_btrfs ( const Device device)

Converts pointer to Device to pointer to Btrfs.

Returns
Pointer to Btrfs.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_btrfs_subvolume() [1/2]

BtrfsSubvolume* storage::to_btrfs_subvolume ( Device device)

Converts pointer to Device to pointer to BtrfsSubvolume.

Returns
Pointer to BtrfsSubvolume.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_btrfs_subvolume() [2/2]

const BtrfsSubvolume* storage::to_btrfs_subvolume ( const Device device)

Converts pointer to Device to pointer to BtrfsSubvolume.

Returns
Pointer to BtrfsSubvolume.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_dasd() [1/2]

Dasd* storage::to_dasd ( Device device)

Converts pointer to Device to pointer to Dasd.

Returns
Pointer to Dasd.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_dasd() [2/2]

const Dasd* storage::to_dasd ( const Device device)

Converts pointer to Device to pointer to Dasd.

Returns
Pointer to Dasd.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_dasd_pt() [1/2]

DasdPt* storage::to_dasd_pt ( Device device)

Converts pointer to Device to pointer to DasdPt.

Returns
Pointer to DasdPt.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_dasd_pt() [2/2]

const DasdPt* storage::to_dasd_pt ( const Device device)

Converts pointer to Device to pointer to DasdPt.

Returns
Pointer to DasdPt.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_disk() [1/2]

Disk* storage::to_disk ( Device device)

Converts pointer to Device to pointer to Disk.

Returns
Pointer to Disk.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_disk() [2/2]

const Disk* storage::to_disk ( const Device device)

Converts pointer to Device to pointer to Disk.

Returns
Pointer to Disk.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_dm_raid() [1/2]

DmRaid* storage::to_dm_raid ( Device device)

Converts pointer to Device to pointer to DmRaid.

Returns
Pointer to Dmraid.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_dm_raid() [2/2]

const DmRaid* storage::to_dm_raid ( const Device device)

Converts pointer to Device to pointer to DmRaid.

Returns
Pointer to Dmraid.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_encryption() [1/2]

Encryption* storage::to_encryption ( Device device)

Converts pointer to Device to pointer to Encryption.

Returns
Pointer to Encryption.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_encryption() [2/2]

const Encryption* storage::to_encryption ( const Device device)

Converts pointer to Device to pointer to Encryption.

Returns
Pointer to Encryption.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_ext() [1/2]

Ext* storage::to_ext ( Device device)

Converts pointer to Device to pointer to Ext.

Returns
Pointer to Ext.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_ext() [2/2]

const Ext* storage::to_ext ( const Device device)

Converts pointer to Device to pointer to Ext.

Returns
Pointer to Ext.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_ext2() [1/2]

Ext2* storage::to_ext2 ( Device device)

Converts pointer to Device to pointer to Ext2.

Returns
Pointer to Ext2.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_ext2() [2/2]

const Ext2* storage::to_ext2 ( const Device device)

Converts pointer to Device to pointer to Ext2.

Returns
Pointer to Ext2.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_ext3() [1/2]

Ext3* storage::to_ext3 ( Device device)

Converts pointer to Device to pointer to Ext3.

Returns
Pointer to Ext3.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_ext3() [2/2]

const Ext3* storage::to_ext3 ( const Device device)

Converts pointer to Device to pointer to Ext3.

Returns
Pointer to Ext3.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_ext4() [1/2]

Ext4* storage::to_ext4 ( Device device)

Converts pointer to Device to pointer to Ext4.

Returns
Pointer to Ext4.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_ext4() [2/2]

const Ext4* storage::to_ext4 ( const Device device)

Converts pointer to Device to pointer to Ext4.

Returns
Pointer to Ext4.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_filesystem() [1/2]

Filesystem* storage::to_filesystem ( Device device)

Converts pointer to Device to pointer to Filesystem.

Returns
Pointer to Filesystem.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_filesystem() [2/2]

const Filesystem* storage::to_filesystem ( const Device device)

Converts pointer to Device to pointer to Filesystem.

Returns
Pointer to Filesystem.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_filesystem_user() [1/2]

FilesystemUser* storage::to_filesystem_user ( Holder holder)

Converts pointer to Holder to pointer to FilesystemUser.

Returns
Pointer to FilesystemUser.
Exceptions
HolderHasWrongType,NullPointerException

◆ to_filesystem_user() [2/2]

const FilesystemUser* storage::to_filesystem_user ( const Holder holder)

Converts pointer to Holder to pointer to FilesystemUser.

Returns
Pointer to FilesystemUser.
Exceptions
HolderHasWrongType,NullPointerException

◆ to_gpt() [1/2]

Gpt* storage::to_gpt ( Device device)

Converts pointer to Device to pointer to Gpt.

Returns
Pointer to Gpt.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_gpt() [2/2]

const Gpt* storage::to_gpt ( const Device device)

Converts pointer to Device to pointer to Gpt.

Returns
Pointer to Gpt.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_implicit_pt() [1/2]

ImplicitPt* storage::to_implicit_pt ( Device device)

Converts pointer to Device to pointer to ImplicitPt.

Returns
Pointer to ImplicitPt.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_implicit_pt() [2/2]

const ImplicitPt* storage::to_implicit_pt ( const Device device)

Converts pointer to Device to pointer to ImplicitPt.

Returns
Pointer to ImplicitPt.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_iso9660() [1/2]

Iso9660* storage::to_iso9660 ( Device device)

Converts pointer to Device to pointer to Iso9660.

Returns
Pointer to Iso9660.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_iso9660() [2/2]

const Iso9660* storage::to_iso9660 ( const Device device)

Converts pointer to Device to pointer to Iso9660.

Returns
Pointer to Iso9660.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_jfs() [1/2]

Jfs* storage::to_jfs ( Device device)

Converts pointer to Device to pointer to Jfs.

Returns
Pointer to Jfs.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_jfs() [2/2]

const Jfs* storage::to_jfs ( const Device device)

Converts pointer to Device to pointer to Jfs.

Returns
Pointer to Jfs.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_luks() [1/2]

Luks* storage::to_luks ( Device device)

Converts pointer to Device to pointer to Luks.

Returns
Pointer to Luks.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_luks() [2/2]

const Luks* storage::to_luks ( const Device device)

Converts pointer to Device to pointer to Luks.

Returns
Pointer to Luks.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_lvm_lv() [1/2]

LvmLv* storage::to_lvm_lv ( Device device)

Converts pointer to Device to pointer to LvmLv.

Returns
Pointer to LvmLv.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_lvm_lv() [2/2]

const LvmLv* storage::to_lvm_lv ( const Device device)

Converts pointer to Device to pointer to LvmLv.

Returns
Pointer to LvmLv.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_lvm_pv() [1/2]

LvmPv* storage::to_lvm_pv ( Device device)

Converts pointer to Device to pointer to LvmPv.

Returns
Pointer to LvmPv.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_lvm_pv() [2/2]

const LvmPv* storage::to_lvm_pv ( const Device device)

Converts pointer to Device to pointer to LvmPv.

Returns
Pointer to LvmPv.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_lvm_vg() [1/2]

LvmVg* storage::to_lvm_vg ( Device device)

Converts pointer to Device to pointer to LvmVg.

Returns
Pointer to LvmVg.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_lvm_vg() [2/2]

const LvmVg* storage::to_lvm_vg ( const Device device)

Converts pointer to Device to pointer to LvmVg.

Returns
Pointer to LvmVg.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_md() [1/2]

Md* storage::to_md ( Device device)

Converts pointer to Device to pointer to Md.

Returns
Pointer to Md.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_md() [2/2]

const Md* storage::to_md ( const Device device)

Converts pointer to Device to pointer to Md.

Returns
Pointer to Md.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_md_container() [1/2]

MdContainer* storage::to_md_container ( Device device)

Converts pointer to Device to pointer to MdContainer.

Returns
Pointer to MdContainer.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_md_container() [2/2]

const MdContainer* storage::to_md_container ( const Device device)

Converts pointer to Device to pointer to MdContainer.

Returns
Pointer to MdContainer.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_md_member() [1/2]

MdMember* storage::to_md_member ( Device device)

Converts pointer to Device to pointer to MdMember.

Returns
Pointer to MdMember.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_md_member() [2/2]

const MdMember* storage::to_md_member ( const Device device)

Converts pointer to Device to pointer to MdMember.

Returns
Pointer to MdMember.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_md_subdevice() [1/2]

MdSubdevice* storage::to_md_subdevice ( Holder holder)

Converts pointer to Holder to pointer to MdSubdevice.

Returns
Pointer to MdSubdevice.
Exceptions
HolderHasWrongType,NullPointerException

◆ to_md_subdevice() [2/2]

const MdSubdevice* storage::to_md_subdevice ( const Holder holder)

Converts pointer to Holder to pointer to MdSubdevice.

Returns
Pointer to MdSubdevice.
Exceptions
HolderHasWrongType,NullPointerException

◆ to_md_user() [1/2]

MdUser* storage::to_md_user ( Holder holder)

Converts pointer to Holder to pointer to MdUser.

Returns
Pointer to MdUser.
Exceptions
HolderHasWrongType,NullPointerException

◆ to_md_user() [2/2]

const MdUser* storage::to_md_user ( const Holder holder)

Converts pointer to Holder to pointer to MdUser.

Returns
Pointer to MdUser.
Exceptions
HolderHasWrongType,NullPointerException

◆ to_mount_point() [1/2]

MountPoint* storage::to_mount_point ( Device device)

Converts pointer to Device to pointer to Mountpoint.

Returns
Pointer to Mountpoint.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_mount_point() [2/2]

const MountPoint* storage::to_mount_point ( const Device device)

Converts pointer to Device to pointer to Mountpoint.

Returns
Pointer to Mountpoint.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_mountable() [1/2]

Mountable* storage::to_mountable ( Device device)

Converts pointer to Device to pointer to Mountable.

Returns
Pointer to Mountable.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_mountable() [2/2]

const Mountable* storage::to_mountable ( const Device device)

Converts pointer to Device to pointer to Mountable.

Returns
Pointer to Mountable.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_msdos() [1/2]

Msdos* storage::to_msdos ( Device device)

Converts pointer to Device to pointer to Msdos.

Returns
Pointer to Msdos.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_msdos() [2/2]

const Msdos* storage::to_msdos ( const Device device)

Converts pointer to Device to pointer to Msdos.

Returns
Pointer to Msdos.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_multipath() [1/2]

Multipath* storage::to_multipath ( Device device)

Converts pointer to Device to pointer to Multipath.

Returns
Pointer to Multipath.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_multipath() [2/2]

const Multipath* storage::to_multipath ( const Device device)

Converts pointer to Device to pointer to Multipath.

Returns
Pointer to Multipath.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_nfs() [1/2]

Nfs* storage::to_nfs ( Device device)

Converts pointer to Device to pointer to Nfs.

Returns
Pointer to Nfs.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_nfs() [2/2]

const Nfs* storage::to_nfs ( const Device device)

Converts pointer to Device to pointer to Nfs.

Returns
Pointer to Nfs.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_ntfs() [1/2]

Ntfs* storage::to_ntfs ( Device device)

Converts pointer to Device to pointer to Ntfs.

Returns
Pointer to Ntfs.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_ntfs() [2/2]

const Ntfs* storage::to_ntfs ( const Device device)

Converts pointer to Device to pointer to Ntfs.

Returns
Pointer to Ntfs.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_partition() [1/2]

Partition* storage::to_partition ( Device device)

Converts pointer to Device to pointer to Partition.

Returns
Pointer to Partition.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_partition() [2/2]

const Partition* storage::to_partition ( const Device device)

Converts pointer to Device to pointer to Partition.

Returns
Pointer to Partition.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_partition_table() [1/2]

PartitionTable* storage::to_partition_table ( Device device)

Converts pointer to Device to pointer to PartitionTable.

Returns
Pointer to PartitionTable.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_partition_table() [2/2]

const PartitionTable* storage::to_partition_table ( const Device device)

Converts pointer to Device to pointer to PartitionTable.

Returns
Pointer to PartitionTable.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_partitionable() [1/2]

Partitionable* storage::to_partitionable ( Device device)

Converts pointer to Device to pointer to Partitionable.

Returns
Pointer to Partitionable.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_partitionable() [2/2]

const Partitionable* storage::to_partitionable ( const Device device)

Converts pointer to Device to pointer to Partitionable.

Returns
Pointer to Partitionable.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_reiserfs() [1/2]

Reiserfs* storage::to_reiserfs ( Device device)

Converts pointer to Device to pointer to Reiserfs.

Returns
Pointer to Reiserfs.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_reiserfs() [2/2]

const Reiserfs* storage::to_reiserfs ( const Device device)

Converts pointer to Device to pointer to Reiserfs.

Returns
Pointer to Reiserfs.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_stray_blk_device() [1/2]

StrayBlkDevice* storage::to_stray_blk_device ( Device device)

Converts pointer to Device to pointer to StrayBlkDevice.

Returns
Pointer to StrayBlkDevice.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_stray_blk_device() [2/2]

const StrayBlkDevice* storage::to_stray_blk_device ( const Device device)

Converts pointer to Device to pointer to StrayBlkDevice.

Returns
Pointer to StrayBlkDevice.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_subdevice() [1/2]

Subdevice* storage::to_subdevice ( Holder holder)

Converts pointer to Holder to pointer to Subdevice.

Returns
Pointer to Subdevice.
Exceptions
HolderHasWrongType,NullPointerException

◆ to_subdevice() [2/2]

const Subdevice* storage::to_subdevice ( const Holder holder)

Converts pointer to Holder to pointer to User.

Returns
Pointer to User.
Exceptions
HolderHasWrongType,NullPointerException

◆ to_swap() [1/2]

Swap* storage::to_swap ( Device device)

Converts pointer to Device to pointer to Swap.

Returns
Pointer to Swap.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_swap() [2/2]

const Swap* storage::to_swap ( const Device device)

Converts pointer to Device to pointer to Swap.

Returns
Pointer to Swap.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_udf() [1/2]

Udf* storage::to_udf ( Device device)

Converts pointer to Device to pointer to Udf.

Returns
Pointer to Udf.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_udf() [2/2]

const Udf* storage::to_udf ( const Device device)

Converts pointer to Device to pointer to Udf.

Returns
Pointer to Udf.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_user() [1/2]

User* storage::to_user ( Holder holder)

Converts pointer to Holder to pointer to User.

Returns
Pointer to User.
Exceptions
HolderHasWrongType,NullPointerException

◆ to_user() [2/2]

const User* storage::to_user ( const Holder holder)

Converts pointer to Holder to pointer to User.

Returns
Pointer to User.
Exceptions
HolderHasWrongType,NullPointerException

◆ to_vfat() [1/2]

Vfat* storage::to_vfat ( Device device)

Converts pointer to Device to pointer to Vfat.

Returns
Pointer to Vfat.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_vfat() [2/2]

const Vfat* storage::to_vfat ( const Device device)

Converts pointer to Device to pointer to Vfat.

Returns
Pointer to Vfat.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_xfs() [1/2]

Xfs* storage::to_xfs ( Device device)

Converts pointer to Device to pointer to Xfs.

Returns
Pointer to Xfs.
Exceptions
DeviceHasWrongType,NullPointerException

◆ to_xfs() [2/2]

const Xfs* storage::to_xfs ( const Device device)

Converts pointer to Device to pointer to Xfs.

Returns
Pointer to Xfs.
Exceptions
DeviceHasWrongType,NullPointerException