Lines Matching refs:gpt
33 __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $");
50 #include "gpt.h"
69 resize(gpt_t gpt, u_int entry, off_t alignment, off_t sectors,
79 if (gpt_hdr(gpt) == NULL)
83 ent = gpt_ent_primary(gpt, i);
85 gpt_warnx(gpt, "Entry at index %u is unused", entry);
89 alignsecs = alignment / gpt->secsz;
91 for (map = map_first(gpt); map != NULL; map = map->map_next) {
96 gpt_warnx(gpt, "Could not find map entry corresponding "
106 gpt_warnx(gpt,
112 newsize = map_resize(gpt, map, sectors, alignsecs);
119 gpt_warnx(gpt,
127 if (gpt_write_primary(gpt) == -1)
130 ent = gpt_ent(gpt->gpt, gpt->lbt, i);
133 if (gpt_write_backup(gpt) == -1)
136 gpt_msg(gpt, "Partition %d resized: %" PRIu64 " %" PRIu64, entry,
143 cmd_resize(gpt_t gpt, int argc, char *argv[])
153 gpt_human_get(gpt, &start);
156 else if (gpt_add_ais(gpt, &alignment, &entry, &size, ch) == -1)
164 for (m = map_first(gpt); m != NULL; m = m->map_next) {
175 if ((sectors = gpt_check_ais(gpt, alignment, entry, size)) == -1)
178 return resize(gpt, entry, alignment, sectors, size, quiet);