libparted 3.6
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
device.h File Reference

Go to the source code of this file.

Data Structures

struct  _PedCHSGeometry
 A cylinder-head-sector "old-style" geometry. More...
 
struct  _PedDevice
 A block device - for example, /dev/hda, not /dev/hda3. More...
 
struct  _PedDeviceArchOps
 List of functions implementing architecture-specific operations. More...
 

Typedefs

typedef struct _PedCHSGeometry PedCHSGeometry
 
typedef struct _PedDevice PedDevice
 
typedef struct _PedDeviceArchOps PedDeviceArchOps
 
typedef long long PedSector
 We can address 2^63 sectors.
 

Enumerations

enum  PedDeviceType {
  PED_DEVICE_UNKNOWN = 0 , PED_DEVICE_SCSI = 1 , PED_DEVICE_IDE = 2 , PED_DEVICE_DAC960 = 3 ,
  PED_DEVICE_CPQARRAY = 4 , PED_DEVICE_FILE = 5 , PED_DEVICE_ATARAID = 6 , PED_DEVICE_I2O = 7 ,
  PED_DEVICE_UBD = 8 , PED_DEVICE_DASD = 9 , PED_DEVICE_VIODASD = 10 , PED_DEVICE_SX8 = 11 ,
  PED_DEVICE_DM = 12 , PED_DEVICE_XVD = 13 , PED_DEVICE_SDMMC = 14 , PED_DEVICE_VIRTBLK = 15 ,
  PED_DEVICE_AOE = 16 , PED_DEVICE_MD = 17 , PED_DEVICE_LOOP = 18 , PED_DEVICE_NVME = 19 ,
  PED_DEVICE_RAM = 20 , PED_DEVICE_PMEM = 21 , PED_DEVICE_UNKNOWN = 0 , PED_DEVICE_SCSI = 1 ,
  PED_DEVICE_IDE = 2 , PED_DEVICE_DAC960 = 3 , PED_DEVICE_CPQARRAY = 4 , PED_DEVICE_FILE = 5 ,
  PED_DEVICE_ATARAID = 6 , PED_DEVICE_I2O = 7 , PED_DEVICE_UBD = 8 , PED_DEVICE_DASD = 9 ,
  PED_DEVICE_VIODASD = 10 , PED_DEVICE_SX8 = 11 , PED_DEVICE_DM = 12 , PED_DEVICE_XVD = 13 ,
  PED_DEVICE_SDMMC = 14 , PED_DEVICE_VIRTBLK = 15 , PED_DEVICE_AOE = 16 , PED_DEVICE_MD = 17 ,
  PED_DEVICE_LOOP = 18 , PED_DEVICE_NVME = 19 , PED_DEVICE_RAM = 20 , PED_DEVICE_PMEM = 21
}
 

Functions

void _ped_device_probe (const char *path)
 
int ped_device_begin_external_access (PedDevice *dev)
 Begins external access mode.
 
void ped_device_cache_remove (PedDevice *dev)
 
PedSector ped_device_check (PedDevice *dev, void *buffer, PedSector start, PedSector count)
 
int ped_device_close (PedDevice *dev)
 Close dev.
 
void ped_device_destroy (PedDevice *dev)
 Destroys a device and removes it from the device list, and frees all resources associated with the device (all resources allocated when the device was created).
 
int ped_device_end_external_access (PedDevice *dev)
 Complementary function to ped_device_begin_external_access.
 
void ped_device_free_all ()
 Close/free all devices.
 
PedDeviceped_device_get (const char *path)
 Gets the device "name", where name is usually the block device, e.g.
 
PedConstraintped_device_get_constraint (const PedDevice *dev)
 Get a constraint that represents hardware requirements on geometry.
 
PedConstraintped_device_get_minimal_aligned_constraint (const PedDevice *dev)
 Get a constraint that represents hardware requirements on geometry and alignment.
 
PedAlignmentped_device_get_minimum_alignment (const PedDevice *dev)
 Get an alignment that represents minimum hardware requirements on alignment.
 
PedDeviceped_device_get_next (const PedDevice *dev)
 Returns the next device that was detected by ped_device_probe_all(), or calls to ped_device_get_next().
 
PedConstraintped_device_get_optimal_aligned_constraint (const PedDevice *dev)
 Get a constraint that represents hardware requirements on geometry and alignment.
 
PedAlignmentped_device_get_optimum_alignment (const PedDevice *dev)
 Get an alignment that represents the hardware requirements for optimal performance.
 
int ped_device_is_busy (PedDevice *dev)
 
int ped_device_open (PedDevice *dev)
 Attempt to open a device to allow use of read, write and sync functions.
 
void ped_device_probe_all ()
 Attempts to detect all devices.
 
int ped_device_read (const PedDevice *dev, void *buffer, PedSector start, PedSector count)
 
int ped_device_sync (PedDevice *dev)
 
int ped_device_sync_fast (PedDevice *dev)
 
int ped_device_write (PedDevice *dev, const void *buffer, PedSector start, PedSector count)