summaryrefslogtreecommitdiffstats
path: root/sbin/bsdlabel
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-06-05 08:11:28 +0000
committeriedowse <iedowse@FreeBSD.org>2002-06-05 08:11:28 +0000
commit306d84207e66a03a612bdc2511115dfd7c673ef3 (patch)
tree574dee57f22721020bd14e5e3c74602c44c7f1e8 /sbin/bsdlabel
parenta30fd029236041af70b9a21c141f1b964d28efb7 (diff)
downloadFreeBSD-src-306d84207e66a03a612bdc2511115dfd7c673ef3.zip
FreeBSD-src-306d84207e66a03a612bdc2511115dfd7c673ef3.tar.gz
Oops, unbreak parsing of the `type' field in getasciilabel(). I had
changed a `goto' to a `continue' in revision 1.52, but it continued the wrong loop. Noticed by: bde
Diffstat (limited to 'sbin/bsdlabel')
-rw-r--r--sbin/bsdlabel/bsdlabel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index d29763c..dad7cc6 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -958,8 +958,10 @@ getasciilabel(FILE *f, struct disklabel *lp)
for (; cpp < &dktypenames[DKMAXTYPES]; cpp++)
if (*cpp && streq(*cpp, tp)) {
lp->d_type = cpp - dktypenames;
- continue;
+ break;
}
+ if (cpp < &dktypenames[DKMAXTYPES])
+ continue;
v = atoi(tp);
if ((unsigned)v >= DKMAXTYPES)
fprintf(stderr, "line %d:%s %d\n", lineno,
OpenPOWER on IntegriCloud