diff options
author | jhb <jhb@FreeBSD.org> | 2002-11-12 21:18:54 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-11-12 21:18:54 +0000 |
commit | 3ff77794e7025676d7995c7b3b49693d1caa12d5 (patch) | |
tree | 45c9889bbf1e50c65d3924d76f7a47911590a899 /usr.sbin/sade/label.c | |
parent | 06cee96130b552bf58d882bf86df29b9bc0ba33d (diff) | |
download | FreeBSD-src-3ff77794e7025676d7995c7b3b49693d1caa12d5.zip FreeBSD-src-3ff77794e7025676d7995c7b3b49693d1caa12d5.tar.gz |
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>
Diffstat (limited to 'usr.sbin/sade/label.c')
-rw-r--r-- | usr.sbin/sade/label.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index baba30a..a52ea63 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/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); |