Loading...
Searching...
No Matches
pt-common.h File Reference

Go to the source code of this file.

## Macros

#define | NULL_IF_DISCOVER_ONLY(val)
#define | PT_define_limit_functions(PT_type)
#define | PT_op_function_initializers(PT_type)

## Macro Definition Documentation

## NULL_IF_DISCOVER_ONLY

#define NULL_IF_DISCOVER_ONLY | ( |  | val | ) |

Value:
val

## PT_define_limit_functions

#define PT_define_limit_functions | ( |  | PT_type | ) |

Value:
\
static bool \
PT_type##_partition_check (const PedPartition *part) \
{ \
return ptt_partition_max_start_len (#PT_type, part); \
} \
\
static PedSector \
PT_type##_partition_max_start_sector (void) \
{ \
PedSector max; \
int err = ptt_partition_max_start_sector (#PT_type, &max); \
PED_ASSERT (err == 0); \
return max; \
} \
\
static PedSector \
PT_type##_partition_max_length (void) \
{ \
PedSector max; \
int err = ptt_partition_max_length (#PT_type, &max); \
PED_ASSERT (err == 0); \
return max; \
}
PedSector
long long PedSector
We can address 2^63 sectors.
Definition device.h:31
PedPartition
struct _PedPartition PedPartition
Definition disk.h:120
ptt_partition_max_length
int ptt_partition_max_length(char const *pt_type, PedSector *max)
Definition pt-tools.c:177
ptt_partition_max_start_sector
int ptt_partition_max_start_sector(char const *pt_type, PedSector *max)
Definition pt-tools.c:163
ptt_partition_max_start_len
int ptt_partition_max_start_len(char const *pt_type, const PedPartition *part)
Definition pt-tools.c:121

## PT_op_function_initializers

#define PT_op_function_initializers | ( |  | PT_type | ) |

Value:
probe: PT_type##_probe, \
alloc: PT_type##_alloc, \
duplicate: PT_type##_duplicate, \
free: PT_type##_free, \
read: PT_type##_read, \
partition_new: PT_type##_partition_new, \
partition_duplicate: PT_type##_partition_duplicate, \
partition_set_flag: PT_type##_partition_set_flag, \
partition_get_flag: PT_type##_partition_get_flag, \
partition_set_system: PT_type##_partition_set_system, \
partition_is_flag_available: PT_type##_partition_is_flag_available, \
partition_align: PT_type##_partition_align, \
partition_destroy: PT_type##_partition_destroy, \
partition_enumerate: PT_type##_partition_enumerate, \
alloc_metadata: PT_type##_alloc_metadata, \
get_max_primary_partition_count: PT_type##_get_max_primary_partition_count, \
get_max_supported_partition_count:PT_type##_get_max_supported_partition_count,\
partition_check: PT_type##_partition_check, \
max_length: PT_type##_partition_max_length, \
max_start_sector: PT_type##_partition_max_start_sector
free
void free(void *ptr)