27#ifndef PED_DEVICE_H_INCLUDED
28#define PED_DEVICE_H_INCLUDED
uint32_t start
Definition: dos.c:4
void ped_device_destroy(PedDevice *dev)
Destroys a device and removes it from the device list, and frees all resources associated with the de...
Definition: device.c:189
void ped_device_cache_remove(PedDevice *dev)
Definition: device.c:202
int ped_device_read(const PedDevice *dev, void *buffer, PedSector start, PedSector count)
Definition: device.c:326
int ped_device_is_busy(PedDevice *dev)
Definition: device.c:208
long long PedSector
We can address 2^63 sectors.
Definition: device.in.h:31
int ped_device_close(PedDevice *dev)
Close dev.
Definition: device.c:250
void ped_device_probe_all()
Attempts to detect all devices.
Definition: device.c:126
void _ped_device_probe(const char *path)
Definition: device.c:109
void ped_device_free_all()
Close/free all devices.
Definition: device.c:136
int ped_device_sync(PedDevice *dev)
Definition: device.c:377
PedDeviceType
Definition: device.in.h:33
int ped_device_write(PedDevice *dev, const void *buffer, PedSector start, PedSector count)
Definition: device.c:347
PedSector ped_device_check(PedDevice *dev, void *buffer, PedSector start, PedSector count)
Definition: device.c:359
PedConstraint * ped_device_get_optimal_aligned_constraint(const PedDevice *dev)
Get a constraint that represents hardware requirements on geometry and alignment.
Definition: device.c:496
PedDevice * ped_device_get(const char *name)
Gets the device "name", where name is usually the block device, e.g.
Definition: device.c:149
PedAlignment * ped_device_get_minimum_alignment(const PedDevice *dev)
Get an alignment that represents minimum hardware requirements on alignment.
Definition: device.c:517
int ped_device_begin_external_access(PedDevice *dev)
Begins external access mode.
Definition: device.c:287
PedConstraint * ped_device_get_minimal_aligned_constraint(const PedDevice *dev)
Get a constraint that represents hardware requirements on geometry and alignment.
Definition: device.c:478
PedConstraint * ped_device_get_constraint(const PedDevice *dev)
Get a constraint that represents hardware requirements on geometry.
Definition: device.c:419
PedDevice * ped_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(...
Definition: device.c:100
int ped_device_open(PedDevice *dev)
Attempt to open a device to allow use of read, write and sync functions.
Definition: device.c:226
PedAlignment * ped_device_get_optimum_alignment(const PedDevice *dev)
Get an alignment that represents the hardware requirements for optimal performance.
Definition: device.c:543
int ped_device_end_external_access(PedDevice *dev)
Complementary function to ped_device_begin_external_access.
Definition: device.c:307
int ped_device_sync_fast(PedDevice *dev)
Definition: device.c:394
@ PED_DEVICE_UNKNOWN
Definition: device.in.h:34
@ PED_DEVICE_DAC960
Definition: device.in.h:37
@ PED_DEVICE_MD
Definition: device.in.h:51
@ PED_DEVICE_RAM
Definition: device.in.h:54
@ PED_DEVICE_VIODASD
Definition: device.in.h:44
@ PED_DEVICE_SX8
Definition: device.in.h:45
@ PED_DEVICE_VIRTBLK
Definition: device.in.h:49
@ PED_DEVICE_FILE
Definition: device.in.h:39
@ PED_DEVICE_SDMMC
Definition: device.in.h:48
@ PED_DEVICE_DASD
Definition: device.in.h:43
@ PED_DEVICE_ATARAID
Definition: device.in.h:40
@ PED_DEVICE_UBD
Definition: device.in.h:42
@ PED_DEVICE_DM
Definition: device.in.h:46
@ PED_DEVICE_CPQARRAY
Definition: device.in.h:38
@ PED_DEVICE_NVME
Definition: device.in.h:53
@ PED_DEVICE_I2O
Definition: device.in.h:41
@ PED_DEVICE_PMEM
Definition: device.in.h:55
@ PED_DEVICE_IDE
Definition: device.in.h:36
@ PED_DEVICE_AOE
Definition: device.in.h:50
@ PED_DEVICE_XVD
Definition: device.in.h:47
@ PED_DEVICE_SCSI
Definition: device.in.h:35
@ PED_DEVICE_LOOP
Definition: device.in.h:52
char name[16]
Definition: pc98.c:13
A cylinder-head-sector "old-style" geometry.
Definition: device.h:67
int sectors
Definition: device.h:70
int cylinders
Definition: device.h:68
int heads
Definition: device.h:69
Definition: constraint.h:29
List of functions implementing architecture-specific operations.
Definition: device.h:105
void(* probe_all)()
Definition: device.h:121
int(* write)(PedDevice *dev, const void *buffer, PedSector start, PedSector count)
Definition: device.h:115
int(* close)(PedDevice *dev)
Definition: device.h:111
int(* refresh_open)(PedDevice *dev)
Definition: device.h:110
int(* read)(const PedDevice *dev, void *buffer, PedSector start, PedSector count)
Definition: device.h:113
int(* open)(PedDevice *dev)
Definition: device.h:109
void(* destroy)(PedDevice *dev)
Definition: device.h:107
int(* sync_fast)(PedDevice *dev)
Definition: device.h:118
int(* refresh_close)(PedDevice *dev)
Definition: device.h:112
int(* is_busy)(PedDevice *dev)
Definition: device.h:108
PedSector(* check)(PedDevice *dev, void *buffer, PedSector start, PedSector count)
Definition: device.h:119
int(* sync)(PedDevice *dev)
Definition: device.h:117
A block device - for example, /dev/hda, not /dev/hda3.
Definition: device.h:74
char * model
description of hardware (manufacturer, model)
Definition: device.h:77
char * path
device /dev entry
Definition: device.h:79
int dirty
Definition: device.h:90
PedCHSGeometry bios_geom
Definition: device.h:94
int external_mode
Definition: device.h:89
int read_only
Definition: device.h:88
short host
Definition: device.h:95
PedCHSGeometry hw_geom
Definition: device.h:93
int boot_dirty
Definition: device.h:91
PedDeviceType type
SCSI, IDE, etc.
Definition: device.h:81
long long sector_size
logical sector size
Definition: device.h:82
long long phys_sector_size
physical sector size
Definition: device.h:83
PedSector length
device length (LBA)
Definition: device.h:84
short did
Definition: device.h:95
int open_count
the number of times this device has been opened with ped_device_open().
Definition: device.h:86
void * arch_specific
Definition: device.h:97
PedDevice * next
Definition: device.h:75