summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_mbr.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-10-31 22:18:49 +0000
committerphk <phk@FreeBSD.org>2002-10-31 22:18:49 +0000
commit594d92f0f90fc612e2bec96bd4e994b22ff77551 (patch)
treea882359d0cfb120cc2e419917d36437649caadfc /sys/geom/geom_mbr.c
parente85ea23a6d7e09e65f5ab082f874fc1a181d81af (diff)
downloadFreeBSD-src-594d92f0f90fc612e2bec96bd4e994b22ff77551.zip
FreeBSD-src-594d92f0f90fc612e2bec96bd4e994b22ff77551.tar.gz
Spruce up bootverbose output a bit.
Allow extended partitions to have flag=0x80
Diffstat (limited to 'sys/geom/geom_mbr.c')
-rw-r--r--sys/geom/geom_mbr.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c
index d1d761c..d53b4f9 100644
--- a/sys/geom/geom_mbr.c
+++ b/sys/geom/geom_mbr.c
@@ -159,7 +159,7 @@ static struct dos_partition historical_bogus_partition_table_fixed[NDOSPART] = {
};
static void
-g_mbr_print(int i __unused, struct dos_partition *dp __unused)
+g_mbr_print(int i, struct dos_partition *dp)
{
g_hexdump(dp, sizeof(dp[0]));
@@ -247,7 +247,7 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist)
if (dp[i].dp_size == 0)
continue;
if (bootverbose) {
- printf("Slice %d:\n", i + 1);
+ printf("Slice %d on %s:\n", i + 1, gp->name);
g_mbr_print(i, dp + i);
}
npart++;
@@ -324,16 +324,6 @@ g_mbrext_dumpconf(struct sbuf *sb, char *indent, struct g_geom *gp, struct g_con
}
}
-static void
-g_mbrext_print(int i, struct dos_partition *dp)
-{
- g_hexdump(dp, sizeof(dp[0]));
- printf("[%d] f:%02x typ:%d", i, dp->dp_flag, dp->dp_typ);
- printf(" s(CHS):%d/%d/%d", dp->dp_scyl, dp->dp_shd, dp->dp_ssect);
- printf(" e(CHS):%d/%d/%d", dp->dp_ecyl, dp->dp_ehd, dp->dp_esect);
- printf(" s:%d l:%d\n", dp->dp_start, dp->dp_size);
-}
-
static struct g_geom *
g_mbrext_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
{
@@ -379,12 +369,13 @@ g_mbrext_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
break;
for (i = 0; i < NDOSPART; i++)
g_dec_dos_partition(
- buf + DOSPARTOFF + i * sizeof(struct dos_partition),
- dp + i);
+ buf + DOSPARTOFF +
+ i * sizeof(struct dos_partition), dp + i);
g_free(buf);
- g_mbrext_print(0, dp);
- g_mbrext_print(1, dp + 1);
- if (dp[0].dp_flag == 0 && dp[0].dp_size != 0) {
+ printf("Slice %d on %s:\n", slice + 5, gp->name);
+ g_mbr_print(0, dp);
+ g_mbr_print(1, dp + 1);
+ if ((dp[0].dp_flag & 0x7f) == 0 && dp[0].dp_size != 0) {
g_topology_lock();
pp2 = g_slice_addslice(gp, slice,
(((off_t)dp[0].dp_start) << 9ULL) + off,
OpenPOWER on IntegriCloud