aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2002-11-12 21:18:54 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2002-11-12 21:18:54 +0000
commit8af5a8f998a0a490e33f065c4d3117ce36bd9521 (patch)
tree45c9889bbf1e50c65d3924d76f7a47911590a899 /usr.sbin/sysinstall
parent9866352ec765176c127868a10aebb7ce34d88302 (diff)
downloadsrc-8af5a8f998a0a490e33f065c4d3117ce36bd9521.tar.gz
src-8af5a8f998a0a490e33f065c4d3117ce36bd9521.zip
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>
Notes
Notes: svn path=/head/; revision=106830
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r--usr.sbin/sysinstall/label.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index baba30a5498b..a52ea63fc2d8 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/sysinstall/label.c
@@ -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);