27#ifndef PED_GEOM_H_INCLUDED
28#define PED_GEOM_H_INCLUDED
uint32_t start
Definition: dos.c:4
uint32_t length
Definition: dos.c:5
offset
Definition: fdasd.h:264
long long PedSector
We can address 2^63 sectors.
Definition: device.h:31
PedSector ped_geometry_check(PedGeometry *geom, void *buffer, PedSector buffer_size, PedSector offset, PedSector granularity, PedSector count, PedTimer *timer)
Checks for physical disk errors.
Definition: geom.c:407
PedGeometry * ped_geometry_duplicate(const PedGeometry *geom)
Duplicate a PedGeometry object.
Definition: geom.c:104
void ped_geometry_destroy(PedGeometry *geom)
Destroy a PedGeometry object.
Definition: geom.c:140
int ped_geometry_test_sector_inside(const PedGeometry *geom, PedSector sect)
Tests if sector is inside geom.
Definition: geom.c:261
int ped_geometry_test_overlap(const PedGeometry *a, const PedGeometry *b)
Test if a overlaps with b.
Definition: geom.c:205
PedSector ped_geometry_map(const PedGeometry *dst, const PedGeometry *src, PedSector sector)
This function takes a sector inside the region described by src, and returns that sector's address in...
Definition: geom.c:467
int ped_geometry_write(PedGeometry *geom, const void *buffer, PedSector offset, PedSector count)
Writes data into the region represented by geom.
Definition: geom.c:362
int ped_geometry_read_alloc(const PedGeometry *geom, void **buffer, PedSector offset, PedSector count)
Definition: geom.c:305
int ped_geometry_set(PedGeometry *geom, PedSector start, PedSector length)
Assign a new start, end (implicitly) and length to geom.
Definition: geom.c:153
PedGeometry * ped_geometry_intersect(const PedGeometry *a, const PedGeometry *b)
Return a PedGeometry object that refers to the intersection of a and b.
Definition: geom.c:120
int ped_geometry_sync(PedGeometry *geom)
Flushes the cache on geom.
Definition: geom.c:331
PedGeometry * ped_geometry_new(const PedDevice *dev, PedSector start, PedSector length)
Create a new PedGeometry object on disk, starting at start with a size of length sectors.
Definition: geom.c:74
int ped_geometry_test_equal(const PedGeometry *a, const PedGeometry *b)
Tests if a and b refer to the same physical region.
Definition: geom.c:245
int ped_geometry_test_inside(const PedGeometry *a, const PedGeometry *b)
Tests if b lies completely within a.
Definition: geom.c:227
int ped_geometry_sync_fast(PedGeometry *geom)
Flushes the cache on geom.
Definition: geom.c:348
int ped_geometry_set_start(PedGeometry *geom, PedSector start)
Assign a new start to geom without changing geom->end.
Definition: geom.c:181
int ped_geometry_read(const PedGeometry *geom, void *buffer, PedSector offset, PedSector count)
Reads data from the region represented by geom.
Definition: geom.c:283
int ped_geometry_set_end(PedGeometry *geom, PedSector end)
Assign a new end to geom without changing geom->start.
Definition: geom.c:192
int ped_geometry_init(PedGeometry *geom, const PedDevice *dev, PedSector start, PedSector length)
Initialize the previously allocated PedGeometry geom.
Definition: geom.c:57
uint8_t sector
Definition: pc98.c:7
A block device - for example, /dev/hda, not /dev/hda3.
Definition: device.h:74
Geometry of the partition.
Definition: geom.h:35
PedSector end
Definition: geom.h:39
PedSector start
Definition: geom.h:37
PedSector length
Definition: geom.h:38
PedDevice * dev
Definition: geom.h:36