HomeSort by: relevance | last modified time | path
    Searched refs:gpt (Results 1 - 25 of 51) sorted by relevancy

1 2 3

  /src/tests/sbin/gpt/
Makefile 5 TESTSDIR= ${TESTSBASE}/sbin/gpt
10 FILES= gpt.empty.show.normal gpt.backup gpt.removepart.show.normal
11 FILES+= gpt.2part.show.uuid gpt.2part.show.normal gpt.2part.show.label
12 FILES+= gpt.resizedisk.show.normal gpt.resizepart.show.normal
13 FILES+= gpt.disklabel gpt.disklabel.show.normal gpt.empty.show.clea
    [all...]
t_gpt.sh 35 disk=gpt.disk
85 silence gpt -T0 create "$disk"
86 match "$(partaddmsg 1 34 1024)" gpt -T1 add -t efi -s 1024 "$disk"
87 match "$(partaddmsg 2 1058 9150)" gpt -T2 add "$disk"
92 file "$src/gpt.2part.show.normal" gpt show "$disk"
93 file "$src/gpt.2part.show.normal-p" gpt show -p "$disk"
94 file "$src/gpt.2part.show.uuid" gpt show -u "$disk
    [all...]
  /src/sbin/gpt/
recover.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/recover.c,v 1.8 2005/08/31 01:47:19 marcel Exp $");
52 #include "gpt.h"
71 recover_gpt_hdr(gpt_t gpt, int type, off_t last)
77 if (gpt_add_hdr(gpt, type, last) == -1)
82 dgpt = &gpt->gpt;
83 dtbl = gpt->tbl;
84 sgpt = gpt->tpg;
85 stbl = gpt->lbt;
90 dgpt = &gpt->tpg
    [all...]
resizedisk.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $");
54 #include "gpt.h"
74 * relocate the secondary GPT based on the following criteria:
85 resizedisk(gpt_t gpt, off_t sector, off_t size __unused, bool quiet)
94 last = gpt->mediasz / gpt->secsz - 1;
99 gpt_warnx(gpt, "specified number of sectors %jd"
105 mbrmap = map_find(gpt, MAP_TYPE_PMBR);
107 gpt_warnx(gpt, "No valid PMBR found");
112 gpt->gpt = map_find(gpt, MAP_TYPE_PRI_GPT_HDR)
    [all...]
map.h 28 * $FreeBSD: src/sbin/gpt/map.h,v 1.6 2005/08/31 01:47:19 marcel Exp $
54 struct gpt;
56 struct map *map_add(struct gpt *, off_t, off_t, int, void *, int);
57 struct map *map_alloc(struct gpt *, off_t, off_t, off_t);
58 struct map *map_find(struct gpt *, int);
59 struct map *map_first(struct gpt *);
60 struct map *map_last(struct gpt *);
61 off_t map_resize(struct gpt *, struct map *, off_t, off_t);
62 off_t map_free(struct gpt *, off_t, off_t);
63 int map_init(struct gpt *, off_t)
    [all...]
create.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/create.c,v 1.11 2005/08/31 01:47:19 marcel Exp $");
54 #include "gpt.h"
74 create(gpt_t gpt, u_int parts, int force, int primary_only, int active)
76 off_t last = gpt_last(gpt);
80 map = map_find(gpt, MAP_TYPE_MBR);
83 gpt_warnx(gpt, "Device contains a MBR");
93 if (map_find(gpt, MAP_TYPE_PMBR) == NULL) {
94 if (map_free(gpt, 0LL, 1LL) == 0) {
95 gpt_warnx(gpt, "No room for the PMBR");
98 mbr = gpt_read(gpt, 0LL, 1)
    [all...]
destroy.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/destroy.c,v 1.6 2005/08/31 01:47:19 marcel Exp $");
49 #include "gpt.h"
69 destroy(gpt_t gpt, int force __unused, int recoverable)
73 pri_hdr = map_find(gpt, MAP_TYPE_PRI_GPT_HDR);
74 sec_hdr = map_find(gpt, MAP_TYPE_SEC_GPT_HDR);
75 pmbr = map_find(gpt, MAP_TYPE_PMBR);
78 gpt_warnx(gpt, "Device doesn't contain a GPT");
83 gpt_warnx(gpt, "Recoverability not possible");
88 memset(pri_hdr->map_data, 0, gpt->secsz)
    [all...]
gpt.c 35 __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
38 __RCSID("$NetBSD: gpt.c,v 1.100 2026/02/09 12:49:18 kre Exp $");
62 #include "gpt.h"
246 gpt_read(gpt_t gpt, off_t lba, size_t count)
251 count *= gpt->secsz;
256 ofs = lba * gpt->secsz;
257 if (lseek(gpt->fd, ofs, SEEK_SET) == ofs &&
258 read(gpt->fd, buf, count) == (ssize_t)count)
266 gpt_write(gpt_t gpt, map_t map
488 gpt_t gpt; local
    [all...]
restore.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/create.c,v 1.11 2005/08/31 01:47:19 marcel Exp $");
55 #include "gpt.h"
74 gpt_warnx(gpt, "proplib failure"); \
79 restore_mbr(gpt_t gpt, struct mbr *mbr, prop_dictionary_t mbr_dict, off_t last)
131 restore_ent(gpt_t gpt, prop_dictionary_t gpt_dict, void *secbuf,
141 gpt_warnx(gpt, "%s: not able to convert to an UUID", s);
146 gpt_warnx(gpt, "%s: not able to convert to an UUID", s);
165 gpt_warnx(gpt, "Entity index out of bounds %u > %u\n",
169 memcpy((char *)secbuf + gpt->secsz + ((i - 1) * sizeof(ent)),
175 restore(gpt_t gpt, const char *infile, int force
    [all...]
set.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $");
49 #include "gpt.h"
70 cmd_set(gpt_t gpt, int argc, char *argv[])
81 if (gpt == NULL || gpt_attr_get(gpt, &attributes) == -1)
85 if (gpt == NULL || gpt_human_get(gpt, &start) == -1)
89 if (gpt == NULL || gpt_uint_get(gpt, &entry) == -1)
104 for (m = map_first(gpt); m != NULL; m = m->map_next)
    [all...]
unset.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $");
49 #include "gpt.h"
70 cmd_unset(gpt_t gpt, int argc, char *argv[])
81 if (gpt == NULL || gpt_attr_get(gpt, &attributes) == -1)
85 if (gpt == NULL || gpt_human_get(gpt, &start) == -1)
89 if (gpt == NULL || gpt_uint_get(gpt, &entry) == -1)
101 for (m = map_first(gpt); m != NULL; m = m->map_next)
    [all...]
add.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $");
53 #include "gpt.h"
86 add(gpt_t gpt, off_t alignment, off_t block, off_t sectors, off_t size __unused,
96 if ((hdr = gpt_hdr(gpt)) == NULL)
102 gpt_warnx(gpt, "index %u out of range (%u max)",
109 ent = gpt_ent_primary(gpt, i);
111 gpt_warnx(gpt, "Entry at index %u is not free", entry);
115 /* Find empty slot in GPT table. */
117 ent = gpt_ent_primary(gpt, i);
122 gpt_warnx(gpt, "No available table entries")
    [all...]
biosboot.c 68 #include "gpt.h"
94 read_boot(gpt_t gpt, const char *bootpath)
114 gpt_warn(gpt, "Can't allocate memory for bootpath");
118 if ((buf = malloc((size_t)gpt->secsz)) == NULL) {
119 gpt_warn(gpt, "Can't allocate memory for sector");
125 gpt_warn(gpt, "Can't open `%s'", bp);
130 gpt_warnx(gpt, "The bootcode in `%s' does not match the"
136 gpt_warn(gpt, "Error reading from `%s'", bp);
153 set_bootable(gpt_t gpt, map_t map, map_t tbl, unsigned int i)
168 return gpt_write_crc(gpt, map, tbl)
    [all...]
resize.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $");
53 #include "gpt.h"
72 resize(gpt_t gpt, u_int entry, off_t alignment, off_t sectors,
82 if (gpt_hdr(gpt) == NULL)
86 ent = gpt_ent_primary(gpt, i);
88 gpt_warnx(gpt, "Entry at index %u is unused", entry);
92 alignsecs = alignment / gpt->secsz;
94 for (map = map_first(gpt); map != NULL; map = map->map_next) {
99 gpt_warnx(gpt, "Could not find map entry corresponding "
109 gpt_warnx(gpt,
    [all...]
header.c 52 #include "gpt.h"
71 header(gpt_t gpt)
78 gpt_show_num("Media Size", (uintmax_t)gpt->mediasz);
79 printf("Sector Size: %u\n", gpt->secsz);
82 (uintmax_t)(gpt->mediasz / gpt->secsz));
86 map = map_find(gpt, MAP_TYPE_PRI_GPT_HDR);
88 printf("- GPT Header not found\n");
94 printf("- GPT Header Revision: %u.%u\n", revision >> 16,
100 printf("- Number of GPT Entries: %u\n", le32toh(hdr->hdr_entries))
    [all...]
uuid.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/remove.c,v 1.10 2006/10/04 18:20:25 marcel Exp $");
49 #include "gpt.h"
69 gpt_t gpt; member in struct:uuidctx
83 gpt_uuid_generate(ctx->gpt, uuidstore);
95 gpt_uuid_generate(ctx->gpt, uuidstore);
100 cmd_uuid(gpt_t gpt, int argc, char *argv[])
107 if (gpt == NULL)
114 ctx.gpt = gpt;
129 if (gpt_add_find(gpt, &find, ch) == -1
    [all...]
type.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/remove.c,v 1.10 2006/10/04 18:20:25 marcel Exp $");
49 #include "gpt.h"
77 cmd_type(gpt_t gpt, int argc, char *argv[])
94 if (gpt == NULL || gpt_uuid_get(gpt, &newtype) == -1)
103 if (gpt == NULL || gpt_add_find(gpt, &find, ch) == -1)
111 if (gpt == NULL || gpt_uuid_is_nil(newtype) || argc != optind)
114 return gpt_change_ent(gpt, &find, change, &newtype);
migrate.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/migrate.c,v 1.16 2005/09/01 02:42:52 marcel Exp $");
62 #include "gpt.h"
125 freebsd_fstype_to_gpt_type(gpt_t gpt, u_int i __unused, u_int fstype)
139 gpt_warnx(gpt, "Unknown FreeBSD partition (%d)", fstype);
145 netbsd_fstype_to_gpt_type(gpt_t gpt, u_int i, u_int fstype)
167 gpt_warnx(gpt, "Partition %u unknown type %s, "
174 migrate_disklabel(gpt_t gpt, off_t start, struct gpt_ent *ent,
183 buf = gpt_read(gpt, start + LABELSECTOR, 1);
185 gpt_warn(gpt, "Error reading label");
192 gpt_warnx(gpt, "MBR partition without disklabel")
    [all...]
gpt_private.h 37 struct gpt { struct
44 struct map *tbl, *lbt, *gpt, *tpg; member in struct:gpt
map.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/map.c,v 1.6 2005/08/31 01:47:19 marcel Exp $");
45 #include "gpt.h"
80 "primary gpt header",
81 "secondary gpt header",
82 "primary gpt table",
83 "secondary gpt table",
84 "gpt partition",
97 map_add(gpt_t gpt, off_t start, off_t size, int type, void *data, int alloc)
104 for (n = gpt->mediamap; n; n = n->map_next)
109 n = gpt->mediamap
    [all...]
label.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/label.c,v 1.3 2006/10/04 18:20:25 marcel Exp $");
49 #include "gpt.h"
78 name_from_file(gpt_t gpt, void *v)
93 gpt_warn(gpt, "Can't open `%s'", fn);
100 gpt_warn(gpt, "Can't copy string");
105 gpt_warn(gpt, "Can't label from `%s'", fn);
124 cmd_label(gpt_t gpt, int argc, char *argv[])
137 if (name_from_file(gpt, &name) == -1)
141 if (gpt_name_get(gpt, &name) == -1)
150 if (gpt_add_find(gpt, &find, ch) == -1
    [all...]
Makefile 2 # $FreeBSD: src/sbin/gpt/Makefile,v 1.7 2005/09/01 02:49:20 marcel Exp $
7 PROG= gpt
8 SRCS= add.c biosboot.c create.c destroy.c gpt.c header.c label.c map.c \
11 MAN= gpt.8
13 #LINKS= ${BINDIR}/gpt ${BINDIR}/gptlabel
14 #MLINKS= gpt.8 gptlabel.8
remove.c 33 __FBSDID("$FreeBSD: src/sbin/gpt/remove.c,v 1.10 2006/10/04 18:20:25 marcel Exp $");
49 #include "gpt.h"
76 cmd_remove(gpt_t gpt, int argc, char *argv[])
86 if (gpt_add_find(gpt, &find, ch) == -1)
92 return gpt_change_ent(gpt, &find, change, NULL);
  /src/tools/gpt/
Makefile 3 HOSTPROGNAME= ${_TOOL_PREFIX}gpt
4 HOST_SRCDIR= sbin/gpt
  /src/distrib/utils/embedded/files/
resize_gpt 31 gpt -H resizedisk -q ${BLOCK_DEVICE}
32 gpt -H resize -a 4m -i 2 -q ${BLOCK_DEVICE}

Completed in 1290 milliseconds

1 2 3