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/geom/geom_slice.c | |
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/geom/geom_slice.c')
-rw-r--r-- | sys/geom/geom_slice.c | 25 |
1 files changed, 20 insertions, 5 deletions
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); } |