Sanitize setting of labeloffset and labelsector.

This commit is contained in:
Poul-Henning Kamp 2003-06-07 09:09:39 +00:00
parent 2d20f433ed
commit 246300f212
2 changed files with 5 additions and 12 deletions

View File

@ -161,12 +161,10 @@ main(int argc, char *argv[])
xxboot = optarg;
break;
case 'm':
if (!strcmp(optarg, "i386")) {
labelsoffset = 1;
labeloffset = 0;
bbsize = 8192;
alphacksum = 0;
} else if (!strcmp(optarg, "pc98")) {
if (!strcmp(optarg, "i386") ||
!strcmp(optarg, "amd64") ||
!strcmp(optarg, "ia64") ||
!strcmp(optarg, "pc98")) {
labelsoffset = 1;
labeloffset = 0;
bbsize = 8192;
@ -176,11 +174,6 @@ main(int argc, char *argv[])
labeloffset = 64;
bbsize = 8192;
alphacksum = 1;
} else if (!strcmp(optarg, "ia64")) {
labelsoffset = 1;
labeloffset = 0;
bbsize = 8192;
alphacksum = 0;
} else {
errx(1, "Unsupported architecture");
}

View File

@ -3,7 +3,7 @@
TMP=/tmp/$$.
set -e
for TEST in "i386 512" "i386 4096" "alpha 512" "pc98 512" "pc98 4096"
for TEST in "i386 512" "i386 4096" "alpha 512"
do
set $TEST
ARCH=$1