Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/common/part.h
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
typedef int (diskread_t)(void *arg, void *buf, size_t blocks, uint64_t offset); | typedef int (diskread_t)(void *arg, void *buf, size_t blocks, uint64_t offset); | ||||
typedef int (ptable_iterate_t)(void *arg, const char *partname, | typedef int (ptable_iterate_t)(void *arg, const char *partname, | ||||
const struct ptable_entry *part); | const struct ptable_entry *part); | ||||
struct ptable *ptable_open(void *dev, uint64_t sectors, uint16_t sectorsize, | struct ptable *ptable_open(void *dev, uint64_t sectors, uint16_t sectorsize, | ||||
diskread_t *dread); | diskread_t *dread); | ||||
void ptable_close(struct ptable *table); | void ptable_close(struct ptable *table); | ||||
enum ptable_type ptable_gettype(const struct ptable *table); | enum ptable_type ptable_gettype(const struct ptable *table); | ||||
int ptable_getsize(const struct ptable *table, uint64_t *sizep); | |||||
int ptable_getpart(const struct ptable *table, struct ptable_entry *part, | int ptable_getpart(const struct ptable *table, struct ptable_entry *part, | ||||
int index); | int index); | ||||
int ptable_getbestpart(const struct ptable *table, struct ptable_entry *part); | int ptable_getbestpart(const struct ptable *table, struct ptable_entry *part); | ||||
int ptable_iterate(const struct ptable *table, void *arg, | int ptable_iterate(const struct ptable *table, void *arg, | ||||
ptable_iterate_t *iter); | ptable_iterate_t *iter); | ||||
const char *parttype2str(enum partition_type type); | const char *parttype2str(enum partition_type type); | ||||
#endif /* !_PART_H_ */ | #endif /* !_PART_H_ */ |