libparted 3.6
Loading...
Searching...
No Matches
Macros | Functions
unit.c File Reference

Macros

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

Functions

char * ped_unit_format (const PedDevice *dev, PedSector sector)
 Get a string that describes the location sector on device dev.
 
char * ped_unit_format_byte (const PedDevice *dev, PedSector byte)
 Get a string that describes the location of the byte on device dev.
 
char * ped_unit_format_custom (const PedDevice *dev, PedSector sector, PedUnit unit)
 Get a string that describes the location sector on device dev.
 
char * ped_unit_format_custom_byte (const PedDevice *dev, PedSector byte, PedUnit unit)
 Get a string that describes the location of the byte on device dev.
 
PedUnit ped_unit_get_by_name (const char *unit_name)
 Get a unit based on its textual representation: unit_name.
 
PedUnit ped_unit_get_default ()
 Get the current default unit.
 
const char * ped_unit_get_name (PedUnit unit)
 Get a textual (non-internationalized) representation of a unit.
 
long long ped_unit_get_size (const PedDevice *dev, PedUnit unit)
 Get the byte size of a given unit.
 
int ped_unit_parse (const char *str, const PedDevice *dev, PedSector *sector, PedGeometry **range)
 If str contains a valid description of a location on dev, then *sector is modified to describe the location and a geometry is created in *range describing a 2 units large area centered on *sector.
 
int ped_unit_parse_custom (const char *str, const PedDevice *dev, PedUnit unit, PedSector *sector, PedGeometry **range)
 If str contains a valid description of a location on dev, then *sector is modified to describe the location and a geometry is created in *range describing a 2 units large area centered on *sector.
 
void ped_unit_set_default (PedUnit unit)
 Set the default unit used by subsequent calls to the PedUnit API.