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:
parent
9866352ec7
commit
8af5a8f998
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user