aboutsummaryrefslogtreecommitdiff
path: root/sbin/bsdlabel/bsdlabel.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-06-07 09:09:39 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-06-07 09:09:39 +0000
commit246300f212f9b432b4d16856afc6bf2d7e0316ea (patch)
tree50b7d9b28d01f9f59eea8754205c2dc8e88e263d /sbin/bsdlabel/bsdlabel.c
parent2d20f433edb67463b66ef1e9a00d4beb36f202a0 (diff)
downloadsrc-246300f212f9b432b4d16856afc6bf2d7e0316ea.tar.gz
src-246300f212f9b432b4d16856afc6bf2d7e0316ea.zip
Sanitize setting of labeloffset and labelsector.
Notes
Notes: svn path=/head/; revision=115948
Diffstat (limited to 'sbin/bsdlabel/bsdlabel.c')
-rw-r--r--sbin/bsdlabel/bsdlabel.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index 34ccc8807439..2ac39eb60987 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -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");
}