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
6ceb6e6fac
commit
eac0b70cbc
@ -957,6 +957,9 @@ getasciilabel(FILE *f, struct disklabel *lp)
|
||||
int lineno = 0, errors = 0;
|
||||
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_sbsize = 0; /* XXX */
|
||||
while (fgets(line, sizeof(line) - 1, f)) {
|
||||
|
@ -957,6 +957,9 @@ getasciilabel(FILE *f, struct disklabel *lp)
|
||||
int lineno = 0, errors = 0;
|
||||
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_sbsize = 0; /* XXX */
|
||||
while (fgets(line, sizeof(line) - 1, f)) {
|
||||
|
Loading…
Reference in New Issue
Block a user