diff options
author | phk <phk@FreeBSD.org> | 2002-10-25 20:09:45 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-25 20:09:45 +0000 |
commit | b7e23599cf9a46999e6b321d6868f9d288cff53a (patch) | |
tree | 2d61e7b611c052ff6d2d0f974e8314770ee2c1e8 /sys | |
parent | fa9a77e4ba47f2bd293b7762c9468e77080e8824 (diff) | |
download | FreeBSD-src-b7e23599cf9a46999e6b321d6868f9d288cff53a.zip FreeBSD-src-b7e23599cf9a46999e6b321d6868f9d288cff53a.tar.gz |
Reduce the GEOM verbosity under bootverbose to something more sufferable.
This is not quite the set of information I would want, but the tree where
I have the "correct" version is messed up with conflicts.
Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/geom_disk.c | 2 | ||||
-rw-r--r-- | sys/geom/geom_kern.c | 2 | ||||
-rw-r--r-- | sys/geom/geom_mbr.c | 7 | ||||
-rw-r--r-- | sys/geom/geom_pc98.c | 1 | ||||
-rw-r--r-- | sys/geom/geom_slice.c | 25 |
5 files changed, 26 insertions, 11 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index bd3bf2e..b919cd4 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -235,6 +235,8 @@ g_disk_create(void *arg) pp->mediasize = dev->si_disk->d_mediasize; pp->sectorsize = dev->si_disk->d_sectorsize; g_error_provider(pp, 0); + if (bootverbose) + printf("GEOM: new disk %s\n", gp->name); } diff --git a/sys/geom/geom_kern.c b/sys/geom/geom_kern.c index 0eaf6ad..5901316 100644 --- a/sys/geom/geom_kern.c +++ b/sys/geom/geom_kern.c @@ -149,8 +149,6 @@ void g_init(void) { printf("Initializing GEOMetry subsystem\n"); - if (bootverbose) - g_debugflags |= G_T_TOPOLOGY; sx_init(&topology_lock, "GEOM topology"); g_io_init(); g_event_init(); diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c index 108a013..23b50c3 100644 --- a/sys/geom/geom_mbr.c +++ b/sys/geom/geom_mbr.c @@ -155,13 +155,11 @@ static void g_mbr_print(int i __unused, struct dos_partition *dp __unused) { -#if 0 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); -#endif } static struct g_geom * @@ -235,7 +233,10 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist) continue; if (dp[i].dp_size == 0) continue; - g_mbr_print(i, dp + i); + if (bootverbose) { + printf("Slice %d:\n", i + 1); + g_mbr_print(i, dp + i); + } npart++; ms->type[i] = dp[i].dp_typ; g_topology_lock(); diff --git a/sys/geom/geom_pc98.c b/sys/geom/geom_pc98.c index 6aa466b..6289e05 100644 --- a/sys/geom/geom_pc98.c +++ b/sys/geom/geom_pc98.c @@ -141,7 +141,6 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags) buf[6] != 'L' || buf[7] != '1') break; - for (i = 0; i < 16; i++) { v = g_dec_le2(buf + 512 + 10 + i * 32); u = g_dec_le2(buf + 512 + 14 + i * 32); diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index 35e7896..cc67cb9 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -258,21 +258,32 @@ g_slice_config(struct g_geom *gp, int index, int how, off_t offset, off_t length gsl->length = length; gsl->offset = offset; gsl->sectorsize = sectorsize; - if (length != 0 && pp != NULL) - return (0); - if (length == 0 && pp == NULL) - return (0); - if (length == 0 && pp != NULL) { + if (length == 0) { + if (pp == NULL) + return (0); + if (bootverbose) + printf("GEOM: Deconfigure %s\n", pp->name); g_orphan_provider(pp, ENXIO); gsl->provider = NULL; gsp->nprovider--; return (0); } + if (pp != NULL) { + if (bootverbose) + printf("GEOM: Reconfigure %s, start %jd length %jd end %jd\n", + pp->name, (intmax_t)offset, (intmax_t)length, + (intmax_t)(offset + length - 1)); + return (0); + } va_start(ap, fmt); sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); sbuf_vprintf(sb, fmt, ap); sbuf_finish(sb); pp = g_new_providerf(gp, sbuf_data(sb)); + if (bootverbose) + printf("GEOM: Configure %s, start %jd length %jd end %jd\n", + pp->name, (intmax_t)offset, (intmax_t)length, + (intmax_t)(offset + length - 1)); pp->index = index; pp->mediasize = gsl->length; pp->sectorsize = gsl->sectorsize; @@ -308,6 +319,10 @@ g_slice_addslice(struct g_geom *gp, int index, off_t offset, off_t length, u_int pp->mediasize = gsp->slices[index].length; pp->sectorsize = gsp->slices[index].sectorsize; sbuf_delete(sb); + if (bootverbose) + printf("GEOM: Add %s, start %jd length %jd end %jd\n", + pp->name, (intmax_t)offset, (intmax_t)length, + (intmax_t)(offset + length - 1)); return(pp); } |