Don't complain if we have an inconsistent map that may be the

result of an incomplete migration. An incomplete migration is
one where the MBR is not turned into a PMBR after creating the
GPT. This early in the game it's more convenient to allow the
inconsistency, because that avoids that we have to destroy the
MBR partitioning for now.
This commit is contained in:
Marcel Moolenaar 2002-10-23 03:33:06 +00:00
parent 1494905bb6
commit fec26e0e4c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105759

View File

@ -69,20 +69,25 @@ map_add(off_t start, off_t size, int type, void *data)
}
if (n->map_start == start && n->map_size == size) {
if (n->map_type != MAP_TYPE_UNUSED)
warnx("warning: partition(%llu,%llu) mirrored",
(long long)start, (long long)size);
if (n->map_type != MAP_TYPE_UNUSED) {
if (n->map_type != MAP_TYPE_MBR_PART ||
type != MAP_TYPE_GPT_PART) {
warnx("warning: partition(%llu,%llu) mirrored",
(long long)start, (long long)size);
}
}
n->map_type = type;
n->map_data = data;
return (n);
}
if (n->map_type != MAP_TYPE_UNUSED) {
warnx(
"error: partition(%llu,%llu) overlaps partition(%llu,%llu)",
(long long)start, (long long)size,
(long long)n->map_start, (long long)n->map_size);
return (0);
if (n->map_type != MAP_TYPE_MBR_PART ||
type != MAP_TYPE_GPT_PART) {
warnx("error: bogus map");
return (0);
}
n->map_type = MAP_TYPE_UNUSED;
}
m = mkmap(start, size, type);