24 #ifndef STORAGE_PARTITION_H
25 #define STORAGE_PARTITION_H
28 #include "storage/Devices/BlkDevice.h"
40 PRIMARY, EXTENDED, LOGICAL
44 enum IdNum :
unsigned int {
45 ID_DOS12 = 0x01, ID_DOS16 = 0x06, ID_DOS32 = 0x0c, ID_NTFS = 0x07,
46 ID_EXTENDED = 0x0f, ID_PPC_PREP = 0x41, ID_LINUX = 0x83, ID_SWAP = 0x82,
47 ID_LVM = 0x8e, ID_EFI = 0xef, ID_RAID = 0xfd, ID_APPLE_OTHER = 0x101,
48 ID_APPLE_HFS = 0x102, ID_GPT_BOOT = 0x103, ID_GPT_SERVICE = 0x104,
49 ID_GPT_MSFTRES = 0x105, ID_APPLE_UFS = 0x106, ID_GPT_BIOS = 0x107,
66 unsigned int get_number()
const;
71 unsigned int get_id()
const;
72 void set_id(
unsigned int id);
74 bool get_boot()
const;
75 void set_boot(
bool boot);
88 const Impl& get_impl()
const;
90 virtual Partition* clone()
const override;
99 bool is_partition(
const Device* device);
PartitionType
Partition type (primary, extended, logical)
Definition: Partition.h:39
A start/length pair with a block size.
Definition: Region.h:71
The master container of the libstorage.
Definition: Devicegraph.h:133
An abstract Block Device.
Definition: BlkDevice.h:40
An abstract base class of storage devices, and a vertex in the Devicegraph.
Definition: Device.h:73
Definition: Partitionable.h:40
A partition of a Partitionable, e.g. Disk or Md.
Definition: Partition.h:55
Definition: PartitionTable.h:71
static Partition * create(Devicegraph *devicegraph, const std::string &name, const Region ®ion, PartitionType type)
region is sector-based.