| Top |
| enum | LDMError |
| #define | LDM_TYPE |
| struct | LDM |
| struct | LDMDiskGroup |
| enum | LDMVolumeType |
| struct | LDMVolume |
| struct | LDMPartition |
| struct | LDMDisk |
| LDMPrivate |
LDM * ldm_new ();
Instantiate a new LDM object. LDM scans devices and stores detected metadata.
gboolean ldm_add (LDM *o,const gchar *path,GError **err);
Scan device path
and add its metadata to LDM object o
.
gboolean ldm_add_fd (LDM *o,int fd,guint secsize,const gchar *path,GError **err);
Scan a device which has been previously opened for reading and add its
metadata to LDM object o
.
GArray *
ldm_get_disk_groups (LDM *o);
Get an array of discovered disk groups.
GArray *
ldm_disk_group_get_volumes (LDMDiskGroup *o);
Get an array of all volumes in a disk group.
GArray *
ldm_disk_group_get_partitions (LDMDiskGroup *o);
Get an array of all partitions in a disk group.
GArray *
ldm_disk_group_get_disks (LDMDiskGroup *o);
Get an array of all disks in a disk group.
gchar *
ldm_disk_group_get_name (const LDMDiskGroup *o);
Get the Windows-assigned name of a disk group.
gchar *
ldm_disk_group_get_guid (const LDMDiskGroup *o);
Get the Windows-assigned GUID of a disk group.
GArray *
ldm_volume_get_partitions (LDMVolume *o);
Get an array of all partitions in a volume.
gchar *
ldm_volume_get_name (const LDMVolume *o);
Get the Windows-assigned name of a volume.
LDMVolumeType
ldm_volume_get_voltype (const LDMVolume *o);
Get the volume type. This can be:
guint64
ldm_volume_get_size (const LDMVolume *o);
Get the volume size in sectors.
guint8
ldm_volume_get_part_type (const LDMVolume *o);
Get the 'partition type' of the volume. This is the same 8-bit value that is used to describe partition types on an MBR disk. It is 0x07 for NTFS volumes.
gchar *
ldm_volume_get_hint (const LDMVolume *o);
Get the volume mounting hint. This value specifies how Windows expects the volume to be mounted. For a volume with an assigned drive letter, it might be 'E:'.
guint64
ldm_volume_get_chunk_size (const LDMVolume *o);
Get the chunk size, in sectors, used by striped and raid5 volumes. For other volume types it will be 0.
GString *
ldm_volume_dm_get_name (const LDMVolume *o);
Get the name of the device mapper device which will be created for this volume.
gboolean ldm_volume_dm_create (const LDMVolume *o,GString **created,GError **err);
Create a device mapper device for a volume. If this function is called for
volume whose device already exists it will still return success. However,
created
will not be set.
gboolean ldm_volume_dm_remove (const LDMVolume *o,GString **removed,GError **err);
Remove a device mapper device for a volume. If this function is called for a
volume whose device does not already exist, it will still return success.
However, removed
will not be set.
LDMDisk *
ldm_partition_get_disk (LDMPartition *o);
Get the LDMDisk underlying a partition.
gchar *
ldm_partition_get_name (const LDMPartition *o);
Get the Windows-assigned name of a partition.
guint64
ldm_partition_get_start (const LDMPartition *o);
Get the start sector of a disk, measured from the start of the underlying disk.
guint64
ldm_partition_get_size (const LDMPartition *o);
Get the size of a partition in sectors.
gchar *
ldm_disk_get_name (const LDMDisk *o);
Get the Windows-assigned name of a disk.
gchar *
ldm_disk_get_guid (const LDMDisk *o);
Get the Windows-assigned GUID of a disk.
gchar *
ldm_disk_get_device (const LDMDisk *o);
Get the name of the host device (e.g. /dev/sda) of a disk. This will be NULL if the disk has been identified from metadata on another disk, but has not been discovered during scanning.
guint64
ldm_disk_get_data_start (const LDMDisk *o);
Get the start sector of the data portion of a disk.
guint64
ldm_disk_get_data_size (const LDMDisk *o);
Get the size, in sectors, of the data portion of a disk.
guint64
ldm_disk_get_metadata_start (const LDMDisk *o);
Get the start sector of the metadata portion of a disk.
|
An internal error |
||
|
There was an IO error accessing a device |
||
|
The device is not part of an LDM disk group |
||
|
The LDM metadata is corrupt |
||
|
Detected two disks from the same disk group with inconsistent metadata |
||
|
Unsupported LDM metadata |
||
|
A disk is missing from a disk group |
||
|
An error reported by an external library |
struct LDMPartition {
GObject parent;
LDMPartitionPrivate *priv;
};
An LDM Parition.