diff options
author | jkh <jkh@FreeBSD.org> | 2001-03-23 08:06:19 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 2001-03-23 08:06:19 +0000 |
commit | 329b146b7408b979c00cb25c2323f188ff43479a (patch) | |
tree | b3bf52d84f3097ff375a2cc6de1be8231944fc70 /usr.sbin/sade/label.c | |
parent | f73340ab4e4817c699686fe51cc40c68f2d3a290 (diff) | |
download | FreeBSD-src-329b146b7408b979c00cb25c2323f188ff43479a.zip FreeBSD-src-329b146b7408b979c00cb25c2323f188ff43479a.tar.gz |
Fix a bug with setting the soft updates option from a script.
Eliminate an old warning brought about by insufficient foresight when creating
the Menu structure. Have I ever mentioned that sysinstall really needs to
be rewritten?
Diffstat (limited to 'usr.sbin/sade/label.c')
-rw-r--r-- | usr.sbin/sade/label.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index 9d18939..2375ac0 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -1216,12 +1216,12 @@ diskLabelNonInteractive(Device *dev) if (label_chunk_info[i].type == PART_SLICE) { char name[512]; - int soft, entries = 1; + int entries = 1; while (entries) { snprintf(name, sizeof name, "%s-%d", c1->name, entries); if ((cp = variable_get(name)) != NULL) { - int sz; + int sz, soft = 0; char typ[10], mpoint[50]; if (sscanf(cp, "%s %d %s %d", typ, &sz, mpoint, &soft) < 3) { @@ -1259,8 +1259,7 @@ diskLabelNonInteractive(Device *dev) else { tmp->private_data = new_part(mpoint, TRUE, sz); tmp->private_free = safe_free; - if (!soft) - ((PartInfo *)tmp->private_data)->soft = 1; + ((PartInfo *)tmp->private_data)->soft = soft; status = DITEM_SUCCESS; } } |