diff options
author | phk <phk@FreeBSD.org> | 2003-05-05 06:46:49 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-05-05 06:46:49 +0000 |
commit | 9f0560bebcab5e281e1eca2611bed1cd57bb1740 (patch) | |
tree | f60d4e0363c0b0527fa2503b47e081d77dd17791 /sys | |
parent | d7153c6134ab033f5bb89e669b4deada5287758d (diff) | |
download | FreeBSD-src-9f0560bebcab5e281e1eca2611bed1cd57bb1740.zip FreeBSD-src-9f0560bebcab5e281e1eca2611bed1cd57bb1740.tar.gz |
Turn the check that rawoffset == mbroffset into a warning instead.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/geom_bsd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c index f696d7d..2fe2db6 100644 --- a/sys/geom/geom_bsd.c +++ b/sys/geom/geom_bsd.c @@ -132,9 +132,6 @@ g_bsd_modify(struct g_geom *gp, u_char *label) /* Historical braindamage... */ rawoffset = (off_t)dl.d_partitions[RAW_PART].p_offset * dl.d_secsize; - if ((off_t)rawoffset * secsize != ms->mbroffset) - rawoffset = 0; - for (i = 0; i < dl.d_npartitions; i++) { ppp = &dl.d_partitions[i]; if (ppp->p_size == 0) @@ -144,6 +141,11 @@ g_bsd_modify(struct g_geom *gp, u_char *label) if (o < rawoffset) rawoffset = 0; } + + if ((off_t)rawoffset * dl.d_secsize != ms->mbroffset) + printf("WARNING: Expected rawoffset %jd, found %jd\n", + (intmax_t)ms->mbroffset/dl.d_secsize, + (intmax_t)ms->rawoffset); /* Don't munge open partitions. */ for (i = 0; i < dl.d_npartitions; i++) { |