Loading...
Searching...
No Matches
disk.c File Reference

## Macros

#define | _(String)
#define | N_(String)

## Functions

PedDisk * | _ped_disk_alloc (const PedDevice *dev, const PedDiskType *type)
void | _ped_disk_free (PedDisk *disk)
PedPartition * | _ped_partition_alloc (const PedDisk *disk, PedPartitionType type, const PedFileSystemType *fs_type, PedSector start, PedSector end)
int | _ped_partition_attempt_align (PedPartition *part, const PedConstraint *external, PedConstraint *internal)
void | _ped_partition_free (PedPartition *part)
int | ped_disk_add_partition (PedDisk *disk, PedPartition *part, const PedConstraint *constraint)
| Adds PedPartition `part` to PedDisk `disk`.
int | ped_disk_check (const PedDisk *disk)
| Perform a sanity check on a partition table.
int | ped_disk_clobber (PedDevice *dev)
| Remove all identifying signatures of a partition table,.
int | ped_disk_commit (PedDisk *disk)
int | ped_disk_commit_to_dev (PedDisk *disk)
| Write the changes made to the in-memory description of a partition table to the device.
int | ped_disk_commit_to_os (PedDisk *disk)
| Tell the operating system kernel about the partition table layout of `disk`.
int | ped_disk_delete_all (PedDisk *disk)
| Removes and destroys all partitions on `disk`.
int | ped_disk_delete_partition (PedDisk *disk, PedPartition *part)
| Removes `part` from `disk`, and destroys `part`.
void | ped_disk_destroy (PedDisk *disk)
| Close `disk`.
PedDisk * | ped_disk_duplicate (const PedDisk *old_disk)
| Clone a PedDisk object.
PedPartition * | ped_disk_extended_partition (const PedDisk *disk)
PedDiskFlag | ped_disk_flag_get_by_name (const char *name)
| Returns the flag associated with `name`.
const char * | ped_disk_flag_get_name (PedDiskFlag flag)
| Returns a name for a `flag`, e.g.
PedDiskFlag | ped_disk_flag_next (PedDiskFlag flag)
| Iterates through all disk flags.
int | ped_disk_get_flag (const PedDisk *disk, PedDiskFlag flag)
| Get the state (`1` or `0`) of a flag on a disk.
int | ped_disk_get_last_partition_num (const PedDisk *disk)
| Get the highest available partition number on `disk`.
PedGeometry * | ped_disk_get_max_partition_geometry (PedDisk *disk, PedPartition *part, const PedConstraint *constraint)
| Get the maximum geometry `part` can be grown to, subject to `constraint`.
int | ped_disk_get_max_primary_partition_count (const PedDisk *disk)
| Get the maximum number of (primary) partitions the disk label supports.
bool | ped_disk_get_max_supported_partition_count (const PedDisk *disk, int *supported)
| Get the highest supported partition number on `disk`.
PedPartition * | ped_disk_get_partition (const PedDisk *disk, int num)
| Returns the partition numbered `num`.
PedAlignment * | ped_disk_get_partition_alignment (const PedDisk *disk)
| Get the alignment needed for partition boundaries on this disk.
PedPartition * | ped_disk_get_partition_by_sector (const PedDisk *disk, PedSector sect)
| Returns the partition that contains sect.
int | ped_disk_get_primary_partition_count (const PedDisk *disk)
| Get the number of primary partitions.
uint8_t * | ped_disk_get_uuid (const PedDisk *disk)
| Get the uuid of the disk `disk`.
int | ped_disk_is_flag_available (const PedDisk *disk, PedDiskFlag flag)
| Check whether a given flag is available on a disk.
PedSector | ped_disk_max_partition_length (const PedDisk *disk)
| Return the maximum representable length (in sectors) of a partition on disk \disk.
PedSector | ped_disk_max_partition_start_sector (const PedDisk *disk)
| Return the maximum representable start sector of a partition on disk \disk.
int | ped_disk_maximize_partition (PedDisk *disk, PedPartition *part, const PedConstraint *constraint)
| Grow PedPartition `part` geometry to the maximum possible subject to `constraint`.
int | ped_disk_minimize_extended_partition (PedDisk *disk)
| Reduce the size of the extended partition to a minimum while still wrapping its logical partitions.
PedDisk * | ped_disk_new (PedDevice *dev)
| Read the partition table off a device (if one is found).
PedDisk * | ped_disk_new_fresh (PedDevice *dev, const PedDiskType *type)
| Create a new partition table on `dev`.
PedPartition * | ped_disk_next_partition (const PedDisk *disk, const PedPartition *part)
| Return the next partition after `part` on `disk`.
void | ped_disk_print (const PedDisk *disk)
| Prints a summary of disk's partitions.
PedDiskType * | ped_disk_probe (PedDevice *dev)
| Return the type of partition table detected on "dev".
int | ped_disk_remove_partition (PedDisk *disk, PedPartition *part)
| Removes PedPartition `part` from PedDisk `disk`.
int | ped_disk_set_flag (PedDisk *disk, PedDiskFlag flag, int state)
| Set the state (`1` or `0`) of a flag on a disk.
int | ped_disk_set_partition_geom (PedDisk *disk, PedPartition *part, const PedConstraint *constraint, PedSector start, PedSector end)
| Sets the geometry of `part` (i.e.
int | ped_disk_type_check_feature (const PedDiskType *disk_type, PedDiskTypeFeature feature)
| This function checks if a particular type of partition table supports a feature.
PedDiskType * | ped_disk_type_get (const char *name)
| Return the disk type with a name of "name".
PedDiskType * | ped_disk_type_get_next (PedDiskType const *type)
| Return the next disk type registers, after "type".
void | ped_disk_type_register (PedDiskType *type)
void | ped_disk_type_unregister (PedDiskType *type)
void | ped_partition_destroy (PedPartition *part)
| Destroy a PedPartition object.
PedPartitionFlag | ped_partition_flag_get_by_name (const char *name)
| Returns the flag associated with `name`.
const char * | ped_partition_flag_get_name (PedPartitionFlag flag)
| Returns a name for a `flag`, e.g.
PedPartitionFlag | ped_partition_flag_next (PedPartitionFlag flag)
| Iterates through all flags.
int | ped_partition_get_flag (const PedPartition *part, PedPartitionFlag flag)
| Get the state (`1` or `0`) of a flag on a partition.
const char * | ped_partition_get_name (const PedPartition *part)
| Returns the name of a partition `part`.
char * | ped_partition_get_path (const PedPartition *part)
| Return a path that can be used to address the partition in the operating system.
uint8_t | ped_partition_get_type_id (const PedPartition *part)
| Get the type-id of the partition `part`.
uint8_t * | ped_partition_get_type_uuid (const PedPartition *part)
| Get the type-uuid of the partition `part`.
uint8_t * | ped_partition_get_uuid (const PedPartition *part)
| Get the uuid of the partition `part`.
int | ped_partition_is_active (const PedPartition *part)
| Return whether or not the partition is "active".
int | ped_partition_is_busy (const PedPartition *part)
| Check whether a partition is mounted or busy in some other way.
int | ped_partition_is_flag_available (const PedPartition *part, PedPartitionFlag flag)
| Check whether a given flag is available on a partition.
PedPartition * | ped_partition_new (const PedDisk *disk, PedPartitionType type, const PedFileSystemType *fs_type, PedSector start, PedSector end)
| Create a new PedPartition on `disk`.
int | ped_partition_set_flag (PedPartition *part, PedPartitionFlag flag, int state)
| Set the state (`1` or `0`) of a flag on a partition.
int | ped_partition_set_name (PedPartition *part, const char *name)
| Sets the name of a partition.
int | ped_partition_set_system (PedPartition *part, const PedFileSystemType *fs_type)
| Sets the system type on the partition to `fs_type`.
int | ped_partition_set_type_id (PedPartition *part, uint8_t id)
| Set the type-id of the partition `part`.
int | ped_partition_set_type_uuid (PedPartition *part, const uint8_t *uuid)
| Set the type-uuid of the partition `part`.
const char * | ped_partition_type_get_name (PedPartitionType type)
| Returns a name that seems mildly appropriate for a partition type `type`.