Clear part_set, part_size_type and part_offset_type before parsing the
ascii label; otherwise checklabel() might report spurious errors because of leftovers from a previous pass. Reviewed by: bde MFC after: 1 week
This commit is contained in:
parent
060daf4376
commit
b0459c58c9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=109378
@ -957,6 +957,9 @@ getasciilabel(FILE *f, struct disklabel *lp)
|
|||||||
int lineno = 0, errors = 0;
|
int lineno = 0, errors = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
bzero(&part_set, sizeof(part_set));
|
||||||
|
bzero(&part_size_type, sizeof(part_size_type));
|
||||||
|
bzero(&part_offset_type, sizeof(part_offset_type));
|
||||||
lp->d_bbsize = BBSIZE; /* XXX */
|
lp->d_bbsize = BBSIZE; /* XXX */
|
||||||
lp->d_sbsize = 0; /* XXX */
|
lp->d_sbsize = 0; /* XXX */
|
||||||
while (fgets(line, sizeof(line) - 1, f)) {
|
while (fgets(line, sizeof(line) - 1, f)) {
|
||||||
|
@ -957,6 +957,9 @@ getasciilabel(FILE *f, struct disklabel *lp)
|
|||||||
int lineno = 0, errors = 0;
|
int lineno = 0, errors = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
bzero(&part_set, sizeof(part_set));
|
||||||
|
bzero(&part_size_type, sizeof(part_size_type));
|
||||||
|
bzero(&part_offset_type, sizeof(part_offset_type));
|
||||||
lp->d_bbsize = BBSIZE; /* XXX */
|
lp->d_bbsize = BBSIZE; /* XXX */
|
||||||
lp->d_sbsize = 0; /* XXX */
|
lp->d_sbsize = 0; /* XXX */
|
||||||
while (fgets(line, sizeof(line) - 1, f)) {
|
while (fgets(line, sizeof(line) - 1, f)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user