Remove BAD144 support
This commit is contained in:
parent
21243bc5b9
commit
ba79ac5ee3
@ -273,7 +273,6 @@ ShowChunkFlags(struct chunk *c)
|
||||
if (c->flags & CHUNK_ALIGN) ret[i++] = '=';
|
||||
if (c->flags & CHUNK_PAST_1024) ret[i++] = '>';
|
||||
if (c->flags & CHUNK_IS_ROOT) ret[i++] = 'R';
|
||||
if (c->flags & CHUNK_BAD144) ret[i++] = 'B';
|
||||
ret[i++] = '\0';
|
||||
return ret;
|
||||
}
|
||||
|
@ -228,13 +228,6 @@ Create_Chunk_DWIM(struct disk *d, struct chunk *parent , u_long size, chunk_e ty
|
||||
}
|
||||
return 0;
|
||||
found:
|
||||
if (parent->flags & CHUNK_BAD144) {
|
||||
edge = c1->end - d->bios_sect - 127;
|
||||
if (offset > edge)
|
||||
return 0;
|
||||
if (offset + size > edge)
|
||||
size = edge - offset + 1;
|
||||
}
|
||||
i = Add_Chunk(d,offset,size,"X",type,subtype,flags);
|
||||
if (i)
|
||||
return 0;
|
||||
|
@ -179,8 +179,6 @@ This chunk cannot be booted from because it extends past cylinder 1024.
|
||||
.It CHUNK_BSD_COMPAT
|
||||
This chunk is in the BSD-compatibility, and has a short name too, i.e.
|
||||
.Ql wd0s4f -> wd0f .
|
||||
.It CHUNK_BAD144
|
||||
This chunk has bad144 mapping.
|
||||
.It CHUNK_ALIGN
|
||||
This chunk should be aligned.
|
||||
.It CHUNK_IS_ROOT
|
||||
|
@ -62,8 +62,6 @@ struct chunk {
|
||||
/* this chunk is in the BSD-compatibility, and has a
|
||||
* short name too, ie wd0s4f -> wd0f
|
||||
*/
|
||||
# define CHUNK_BAD144 4
|
||||
/* this chunk has bad144 mapping */
|
||||
# define CHUNK_ALIGN 8
|
||||
/* This chunk should be aligned */
|
||||
# define CHUNK_IS_ROOT 16
|
||||
|
@ -193,27 +193,6 @@ Rule_004(struct disk *d, struct chunk *c, char *msg)
|
||||
if (c->type != freebsd)
|
||||
return;
|
||||
|
||||
if (c->flags & CHUNK_BAD144) {
|
||||
l = c->end - 127 - d->bios_sect + 1;
|
||||
for (c1=c->part; c1; c1=c1->next) {
|
||||
if (c1->end < l || c1->type == unused)
|
||||
continue;
|
||||
sprintf(msg+strlen(msg),
|
||||
"Blocks %lu to %lu are needed for bad144 information, but isn't unused.\n",
|
||||
l, c->end);
|
||||
break;
|
||||
}
|
||||
if (c->flags & CHUNK_PAST_1024) {
|
||||
for (c1=c->part; c1; c1=c1->next) {
|
||||
if (c1->flags & CHUNK_IS_ROOT) {
|
||||
sprintf(msg+strlen(msg),
|
||||
"You have assigned root to a slice which uses bad144, and\n extends past the first 1023 cylinders, and thus cannot be booted from.\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (c1=c->part; c1; c1=c1->next) {
|
||||
if (c1->type != part)
|
||||
continue;
|
||||
@ -303,14 +282,5 @@ ChunkCanBeRoot(struct chunk *c)
|
||||
return strdup(msg);
|
||||
}
|
||||
|
||||
if ((c1->flags & CHUNK_BAD144) && (c1->flags & CHUNK_PAST_1024)) {
|
||||
strcat(msg,
|
||||
"This partition is unsuitable for root, because the FreeBSD slice\n");
|
||||
strcat(msg,
|
||||
"it is inside has bad144 enabled, but the badblock data lives past\n");
|
||||
strcat(msg,
|
||||
"the 1024th cylinder, and the bootblocks cannot get to it there.\n");
|
||||
return strdup(msg);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user