diff options
author | marcel <marcel@FreeBSD.org> | 2002-08-24 22:42:16 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2002-08-24 22:42:16 +0000 |
commit | bf1e0a8b0580886ea78b71fb388595a8b6c03935 (patch) | |
tree | 69b4a09116ec41a00b946285070b13bf1f61be3c | |
parent | 7eb58ddd8f6016c86e17071077ef41c4ac5a1a3b (diff) | |
download | FreeBSD-src-bf1e0a8b0580886ea78b71fb388595a8b6c03935.zip FreeBSD-src-bf1e0a8b0580886ea78b71fb388595a8b6c03935.tar.gz |
Use 'p' as the partition specifier instead of 's'. We continue to use
's' for compatibility partitions (ie partitions with a BSD disklabel).
Partition numbers continue to start with 1.
Example /etc/fstab:
# Device Mountpoint FStype Options ...
/dev/da0p1 /efi msdos rw ...
/dev/da0p2 / ufs rw ...
/dev/da0p3 none swap sw ...
-rw-r--r-- | sys/geom/geom_gpt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/geom/geom_gpt.c b/sys/geom/geom_gpt.c index efcbb2e..3638602 100644 --- a/sys/geom/geom_gpt.c +++ b/sys/geom/geom_gpt.c @@ -143,7 +143,7 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist) struct gpt_ent *ent; struct gpt_hdr *hdr; u_int i, npart, secsz, tblsz; - int error; + int error, ps; g_trace(G_T_TOPOLOGY, "g_gpt_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -209,6 +209,7 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist) for (i = 0; i < hdr->hdr_entries; i++) { struct uuid unused = GPT_ENT_TYPE_UNUSED; + struct uuid freebsd = GPT_ENT_TYPE_FREEBSD; if (i >= GPT_MAX_SLICES) break; ent = (void*)(buf + i * hdr->hdr_entsz); @@ -218,9 +219,11 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist) if (gs->part[i] == NULL) break; bcopy(ent, gs->part[i], hdr->hdr_entsz); + ps = (!memcmp(&ent->ent_type, &freebsd, sizeof(freebsd))) + ? 's' : 'p'; (void)g_slice_addslice(gp, i, ent->ent_lba_start * secsz, (ent->ent_lba_end - ent->ent_lba_start + 1ULL) * secsz, - "%ss%d", gp->name, i + 1); + "%s%c%d", gp->name, ps, i + 1); npart++; } |