|
libstorage-ng
|
The storage namespace. More...
Classes | |
| class | Actiongraph |
| class | AlignError |
| class | Bcache |
| A bcache device. More... | |
| class | BcacheCset |
| A bcache cache set. More... | |
| class | BlkDevice |
| An abstract Block Device. More... | |
| class | Btrfs |
| class | CodeLocation |
| Helper class for UI exceptions: Store BASE_FILE, FUNCTION and LINE. More... | |
| class | CommitCallbacks |
| 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... | |
| struct | DeviceHasWrongType |
| struct | DeviceNotFound |
| struct | DeviceNotFoundByName |
| struct | DeviceNotFoundBySid |
| struct | DeviceNotFoundByUuid |
| class | DifferentBlockSizes |
| class | Disk |
| A physical disk device. More... | |
| class | Encryption |
| An encryption layer on a blk device. More... | |
| class | Environment |
| class | Exception |
| Base class for storage exceptions. More... | |
| class | Ext4 |
| class | Filesystem |
| class | Gpt |
| class | Holder |
| struct | HolderAlreadyExists |
| struct | HolderHasWrongType |
| struct | HolderNotFound |
| struct | HolderNotFoundBySid |
| class | IndexOutOfRangeException |
| Exception class for "index out of range". More... | |
| class | InvalidBlockSize |
| struct | InvalidExtentSize |
| 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 | LvmPv |
| class | LvmVg |
| A Volume Group of the Logical Volume Manager (LVM). More... | |
| struct | LvmVgNotFoundByVgName |
| class | Md |
| A MD device. More... | |
| class | MdUser |
| class | Msdos |
| class | NoIntersection |
| class | NotImplementedException |
| Exception class for features not implemented. More... | |
| 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 |
| class | PartitionTable |
| class | Region |
| A start/length pair with a block size. More... | |
| class | Storage |
| The main entry point to libstorage. More... | |
| class | Subdevice |
| class | Swap |
| class | Topology |
| A class to calculate partition alignment based on hardware topology. More... | |
| class | User |
| class | Vfat |
| struct | WrongNumberOfChildren |
| struct | 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 | GraphvizFlags : unsigned int { NONE = 0x0, TOOLTIP = 0x1, CLASSNAME = 0x2, SID = 0x4, SIZE = 0x8 } |
| Bitfield to control graphviz output. More... | |
| enum | Transport { UNKNOWN, SBP, ATA, FC, ISCSI, SAS, SATA, SPI, USB, FCOE } |
| Data Transport Layer. | |
| enum | DasdFormat { DASDF_NONE, DASDF_LDL, DASDF_CDL } |
| enum | DasdType { DASDTYPE_NONE, DASDTYPE_ECKD, DASDTYPE_FBA } |
| enum | EncryptionType { NONE, TWOFISH, TWOFISH_OLD, TWOFISH256_OLD, LUKS, UNKNOWN } |
| enum | MdLevel { UNKNOWN, UNKNOWN, UNKNOWN, RAID0, RAID1, RAID5, RAID6, RAID10 } |
| 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_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 { PT_UNKNOWN, PT_LOOP, MSDOS, GPT, DASD, MAC } |
| Partition Table Type. | |
| enum | FsType { UNKNOWN, REISERFS, EXT2, EXT3, EXT4, BTRFS, VFAT, XFS, JFS, HFS, NTFS, SWAP, HFSPLUS, NFS, NFS4, TMPFS, ISO9660, UDF } |
| enum | MountByType { DEVICE, UUID, LABEL, ID, PATH } |
| The key by which the mount program identifies a filesystem. | |
| enum | AlignPolicy { ALIGN_END, KEEP_END, KEEP_SIZE } |
Functions | |
| GraphvizFlags | operator| (GraphvizFlags a, GraphvizFlags b) |
| GraphvizFlags | operator & (GraphvizFlags a, GraphvizFlags b) |
| bool | operator && (GraphvizFlags a, GraphvizFlags b) |
| bool | is_bcache (const Device *device) |
| Bcache * | to_bcache (Device *device) |
| const Bcache * | to_bcache (const Device *device) |
| bool | is_bcache_cset (const Device *device) |
| BcacheCset * | to_bcache_cset (Device *device) |
| const BcacheCset * | to_bcache_cset (const Device *device) |
| bool | is_blk_device (const Device *device) |
| BlkDevice * | to_blk_device (Device *device) |
| const BlkDevice * | to_blk_device (const Device *device) |
| std::string | get_transport_name (Transport transport) |
| bool | is_disk (const Device *device) |
| Disk * | to_disk (Device *device) |
| Converts pointer to Device to pointer to Disk. More... | |
| const Disk * | to_disk (const Device *device) |
| Converts pointer to Device to pointer to Disk. More... | |
| bool | is_encryption (const Device *device) |
| Encryption * | to_encryption (Device *device) |
| const Encryption * | to_encryption (const Device *device) |
| bool | is_gpt (const Device *device) |
| Gpt * | to_gpt (Device *device) |
| const Gpt * | to_gpt (const Device *device) |
| bool | is_luks (const Device *device) |
| Luks * | to_luks (Device *device) |
| const Luks * | to_luks (const Device *device) |
| bool | is_lvm_lv (const Device *device) |
| LvmLv * | to_lvm_lv (Device *device) |
| const LvmLv * | to_lvm_lv (const Device *device) |
| bool | is_lvm_pv (const Device *device) |
| LvmPv * | to_lvm_pv (Device *device) |
| const LvmPv * | to_lvm_pv (const Device *device) |
| bool | is_lvm_vg (const Device *device) |
| LvmVg * | to_lvm_vg (Device *device) |
| const LvmVg * | to_lvm_vg (const Device *device) |
| std::string | get_md_level_name (MdLevel md_level) |
| std::string | get_md_parity_name (MdParity md_parity) |
| bool | is_md (const Device *device) |
| Md * | to_md (Device *device) |
| Converts pointer to Device to pointer to Md. More... | |
| const Md * | to_md (const Device *device) |
| Converts pointer to Device to pointer to Md. More... | |
| bool | is_msdos (const Device *device) |
| Msdos * | to_msdos (Device *device) |
| const Msdos * | to_msdos (const Device *device) |
| bool | is_partition (const Device *device) |
| Partition * | to_partition (Device *device) |
| const Partition * | to_partition (const Device *device) |
| bool | is_partitionable (const Device *device) |
| Partitionable * | to_partitionable (Device *device) |
| const Partitionable * | to_partitionable (const Device *device) |
| std::string | get_pt_type_name (PtType pt_type) |
| bool | is_partition_table (const Device *device) |
| PartitionTable * | to_partition_table (Device *device) |
| const PartitionTable * | to_partition_table (const Device *device) |
| bool | is_btrfs (const Device *device) |
| Btrfs * | to_btrfs (Device *device) |
| const Btrfs * | to_btrfs (const Device *device) |
| bool | is_ext4 (const Device *device) |
| Ext4 * | to_ext4 (Device *device) |
| const Ext4 * | to_ext4 (const Device *device) |
| std::string | get_mount_by_name (MountByType mount_by_type) |
| bool | is_filesystem (const Device *device) |
| Filesystem * | to_filesystem (Device *device) |
| const Filesystem * | to_filesystem (const Device *device) |
| bool | is_ntfs (const Device *device) |
| Ntfs * | to_ntfs (Device *device) |
| const Ntfs * | to_ntfs (const Device *device) |
| bool | is_swap (const Device *device) |
| Swap * | to_swap (Device *device) |
| const Swap * | to_swap (const Device *device) |
| bool | is_vfat (const Device *device) |
| Vfat * | to_vfat (Device *device) |
| const Vfat * | to_vfat (const Device *device) |
| bool | is_xfs (const Device *device) |
| Xfs * | to_xfs (Device *device) |
| const Xfs * | to_xfs (const Device *device) |
| bool | is_md_user (const Holder *holder) |
| MdUser * | to_md_user (Holder *device) |
| const MdUser * | to_md_user (const Holder *device) |
| bool | is_subdevice (const Holder *holder) |
| Subdevice * | to_subdevice (Holder *device) |
| const Subdevice * | to_subdevice (const Holder *device) |
| bool | is_user (const Holder *holder) |
| User * | to_user (Holder *device) |
| const User * | to_user (const Holder *device) |
| 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... | |
The storage namespace.
| 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.
|
strong |
Bitfield to control graphviz output.
If TOOLTIP is enabled the output of the others fields is added to the tooltip, otherwise they are added to the label. Not all flags apply to all graphs or all objects (devices, holders and actions).
| enum storage::IdNum : unsigned int |
Enum with values used as partition ids.
For MSDOS the value of the enum is equal to the partition type byte. For GPT and DASD the value has no special meaning.
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 MSDOS. |
| ID_DOS16 | Only for MSDOS. |
| ID_DOS32 | Only for MSDOS. |
| ID_NTFS | Only for MSDOS. |
| ID_EXTENDED | Only for MSDOS. |
| ID_PREP | PPC PReP Boot partition, for MSDOS and GPT. |
| ID_LINUX | For MSDOS and GPT. |
| ID_SWAP | Swap partition, for MSDOS and GPT, but GPT only when the partition is created. |
| ID_LVM | LVM partition, for MSDOS and GPT. |
| ID_RAID | RAID partition, for MSDOS and GPT. |
| ID_ESP | EFI System Partition, for MSDOS and GPT. |
| ID_UNKNOWN | Only set during probing. For MSDOS and GPT. |
| 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. |
| 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.
| size | size in bytes |
| classic | use classic locale instead of global C++ locale |
| precision | number of fraction digits in output |
| omit_zeroes | if true omit trailing zeroes for exact values |
| std::string storage::get_suffix | ( | int | i, |
| bool | classic | ||
| ) |
Return a suffix.
| i | index of suffix |
| classic | use classic locale instead of global C++ locale |
| 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.
| str | size string |
| classic | use classic locale instead of global C++ locale |
| size | size in bytes |
The conversion is always case-insensitive. With classic set to false the conversion is also sloppy concerning omission of 'B'.
| int storage::num_suffixes | ( | ) |
Return number of suffixes.
| std::ostream& storage::operator<< | ( | std::ostream & | str, |
| const CodeLocation & | obj | ||
| ) |
CodeLocation stream output.
Stream output.
Converts pointer to Device to pointer to Disk.
| DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Disk.
| DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Md.
| DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Md.
| DeviceHasWrongType,NullPointerException |
1.8.12