summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/options.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-02-28 21:49:33 +0000
committerjhb <jhb@FreeBSD.org>2006-02-28 21:49:33 +0000
commit1ec49d602a80028377023a0fdc8f11d6281a3b18 (patch)
tree29ca37782709cff55cee2300ecd6319423660211 /usr.sbin/sysinstall/options.c
parent6dd5abcf92dd9a747d9ec038a372392b97daf728 (diff)
downloadFreeBSD-src-1ec49d602a80028377023a0fdc8f11d6281a3b18.zip
FreeBSD-src-1ec49d602a80028377023a0fdc8f11d6281a3b18.tar.gz
Fix numerous warnings. Aside from menu items in system.c and menu.c
this now compiles on i386 with WARNS?= 3. Most of the fixes included adding missing 'static' keywords to internal functions, using fully-defined terminators in statically defined arrays of structs, and various signed vs unsigned mismatches. Also G/C'd unused configSecurity() function.
Diffstat (limited to 'usr.sbin/sysinstall/options.c')
-rw-r--r--usr.sbin/sysinstall/options.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c
index 8e3a7d9..04876d6 100644
--- a/usr.sbin/sysinstall/options.c
+++ b/usr.sbin/sysinstall/options.c
@@ -42,12 +42,12 @@
int fixitTtyWhich(dialogMenuItem *);
static char *
-varCheck(Option opt)
+varCheck(Option *opt)
{
char *cp = NULL;
- if (opt.aux)
- cp = variable_get((char *)opt.aux);
+ if (opt->aux)
+ cp = variable_get((char *)opt->aux);
if (!cp)
return "NO";
return cp;
@@ -55,13 +55,13 @@ varCheck(Option opt)
/* Show our little logo */
static char *
-resetLogo(char *str)
+resetLogo(Option *opt)
{
return "[RESET!]";
}
static char *
-mediaCheck(Option opt)
+mediaCheck(Option *opt)
{
if (mediaDevice) {
switch(mediaDevice->type) {
@@ -155,10 +155,10 @@ static Option Options[] = {
{ "Fixit Console", "Which tty to use for the Fixit action.",
OPT_IS_FUNC, fixitTtyWhich, VAR_FIXIT_TTY, varCheck },
{ "Re-scan Devices", "Re-run sysinstall's initial device probe",
- OPT_IS_FUNC, deviceRescan },
+ OPT_IS_FUNC, deviceRescan, NULL, NULL },
{ "Use Defaults", "Reset all values to startup defaults",
- OPT_IS_FUNC, installVarDefaults, 0, resetLogo },
-{ NULL },
+ OPT_IS_FUNC, installVarDefaults, NULL, resetLogo },
+{ NULL, NULL, 0, NULL, NULL, NULL },
};
#define OPT_START_ROW 4
@@ -183,7 +183,7 @@ value_of(Option opt)
case OPT_IS_FUNC:
case OPT_IS_VAR:
if (opt.check)
- return opt.check(opt);
+ return opt.check(&opt);
else
return "<*>";
}
@@ -216,7 +216,7 @@ fire(Option opt)
variable_set2(opt.aux, "YES", 0);
}
if (opt.check)
- opt.check(opt);
+ opt.check(&opt);
refresh();
return status;
}
OpenPOWER on IntegriCloud