Use a clean flags variable when creating chunks from scripts instead of

leaking flags from earlier chunks into later ones.

PR:		bin/40655
Submitted by:	Thomas Zenker <thz@Lennartz-electronic.de>
This commit is contained in:
John Baldwin 2002-11-12 21:18:54 +00:00
parent 9866352ec7
commit 8af5a8f998
2 changed files with 4 additions and 6 deletions

View File

@ -1326,7 +1326,7 @@ diskLabelNonInteractive(Device *dev)
char *cp;
PartType type;
PartInfo *p;
u_long flags = 0;
u_long flags;
int i, status;
Device **devs;
Disk *d;
@ -1367,6 +1367,7 @@ diskLabelNonInteractive(Device *dev)
} else {
Chunk *tmp;
flags = 0;
if (!strcmp(typ, "swap")) {
type = PART_SWAP;
strcpy(mpoint, "SWAP");
@ -1374,8 +1375,6 @@ diskLabelNonInteractive(Device *dev)
type = PART_FILESYSTEM;
if (!strcmp(mpoint, "/"))
flags |= CHUNK_IS_ROOT;
else
flags &= ~CHUNK_IS_ROOT;
}
if (!sz)
sz = space_free(c1);

View File

@ -1326,7 +1326,7 @@ diskLabelNonInteractive(Device *dev)
char *cp;
PartType type;
PartInfo *p;
u_long flags = 0;
u_long flags;
int i, status;
Device **devs;
Disk *d;
@ -1367,6 +1367,7 @@ diskLabelNonInteractive(Device *dev)
} else {
Chunk *tmp;
flags = 0;
if (!strcmp(typ, "swap")) {
type = PART_SWAP;
strcpy(mpoint, "SWAP");
@ -1374,8 +1375,6 @@ diskLabelNonInteractive(Device *dev)
type = PART_FILESYSTEM;
if (!strcmp(mpoint, "/"))
flags |= CHUNK_IS_ROOT;
else
flags &= ~CHUNK_IS_ROOT;
}
if (!sz)
sz = space_free(c1);