summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>2001-03-23 08:06:19 +0000
committerjkh <jkh@FreeBSD.org>2001-03-23 08:06:19 +0000
commit329b146b7408b979c00cb25c2323f188ff43479a (patch)
treeb3bf52d84f3097ff375a2cc6de1be8231944fc70 /usr.sbin
parentf73340ab4e4817c699686fe51cc40c68f2d3a290 (diff)
downloadFreeBSD-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')
-rw-r--r--usr.sbin/sade/label.c7
-rw-r--r--usr.sbin/sade/menus.c2
-rw-r--r--usr.sbin/sysinstall/label.c7
-rw-r--r--usr.sbin/sysinstall/menus.c2
4 files changed, 8 insertions, 10 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;
}
}
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index 6b922ba..e10a394 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -1320,7 +1320,7 @@ DMenu MenuNetworking = {
{ " NFS server", "This machine will be an NFS server",
dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" },
{ " Ntpdate", "Select a clock-synchronization server",
- dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', "ntpdate_enable=YES" },
+ dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)"ntpdate_enable=YES" },
{ " PCNFSD", "Run authentication server for clients with PC-NFS.",
dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" },
{ " portmap", "This machine wants to run the portmapper daemon",
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index 9d18939..2375ac0 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/sysinstall/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;
}
}
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c
index 6b922ba..e10a394 100644
--- a/usr.sbin/sysinstall/menus.c
+++ b/usr.sbin/sysinstall/menus.c
@@ -1320,7 +1320,7 @@ DMenu MenuNetworking = {
{ " NFS server", "This machine will be an NFS server",
dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" },
{ " Ntpdate", "Select a clock-synchronization server",
- dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', "ntpdate_enable=YES" },
+ dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)"ntpdate_enable=YES" },
{ " PCNFSD", "Run authentication server for clients with PC-NFS.",
dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" },
{ " portmap", "This machine wants to run the portmapper daemon",
OpenPOWER on IntegriCloud