diff options
author | pst <pst@FreeBSD.org> | 1997-09-17 16:18:22 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1997-09-17 16:18:22 +0000 |
commit | 4f718b5d5dce425cd7d4b8dffc42ead31b97e8be (patch) | |
tree | 65dfc78a88a3e556a4910bd8604818834a37b366 /release | |
parent | 0dfe9b61e4cbf3786d7f51e0703645e80c84ef26 (diff) | |
download | FreeBSD-src-4f718b5d5dce425cd7d4b8dffc42ead31b97e8be.zip FreeBSD-src-4f718b5d5dce425cd7d4b8dffc42ead31b97e8be.tar.gz |
Put all variables in VAR_ #define's to force a single location for all
of these magic knobs. This is purely cosmetic and a documentation issue
so we don't have to glop through the source code looking for gems.
Diffstat (limited to 'release')
-rw-r--r-- | release/sysinstall/config.c | 12 | ||||
-rw-r--r-- | release/sysinstall/dispatch.c | 4 | ||||
-rw-r--r-- | release/sysinstall/dmenu.c | 4 | ||||
-rw-r--r-- | release/sysinstall/package.c | 4 | ||||
-rw-r--r-- | release/sysinstall/sysinstall.h | 9 | ||||
-rw-r--r-- | release/sysinstall/tcpip.c | 5 |
6 files changed, 24 insertions, 14 deletions
diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index cb70bce..2b37c89 100644 --- a/release/sysinstall/config.c +++ b/release/sysinstall/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.102 1997/08/17 10:08:25 jkh Exp $ + * $Id: config.c,v 1.103 1997/08/18 21:47:31 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -469,7 +469,8 @@ configSaver(dialogMenuItem *self) int configSaverTimeout(dialogMenuItem *self) { - return (variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver") ? + return (variable_get_value(VAR_BLANKTIME, + "Enter time-out period in seconds for screen saver") ? DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE; } @@ -484,11 +485,14 @@ configNTP(dialogMenuItem *self) { int status; - status = variable_get_value("ntpdate_flags", "Enter the name of an NTP server") ? DITEM_SUCCESS : DITEM_FAILURE; + status = variable_get_value(VAR_NTPDATE_FLAGS, + "Enter the name of an NTP server") + ? DITEM_SUCCESS : DITEM_FAILURE; if (status == DITEM_SUCCESS) { static char tmp[255]; - snprintf(tmp, 255, "ntpdate_enable=YES,ntpdate_flags=%s", variable_get("ntpdate_flags")); + snprintf(tmp, sizeof(tmp), "ntpdate_enable=YES,ntpdate_flags=%s", + variable_get(VAR_NTPDATE_FLAGS)); self->data = tmp; dmenuSetVariables(self); } diff --git a/release/sysinstall/dispatch.c b/release/sysinstall/dispatch.c index 181ccd5..67e09d6 100644 --- a/release/sysinstall/dispatch.c +++ b/release/sysinstall/dispatch.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: dispatch.c,v 1.22 1997/09/08 11:09:08 jkh Exp $ + * $Id: dispatch.c,v 1.23 1997/09/16 18:57:08 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -173,7 +173,7 @@ dispatch_shutdown(dialogMenuItem *unused) static int dispatch_systemExecute(dialogMenuItem *unused) { - char *cmd = variable_get("command"); + char *cmd = variable_get(VAR_COMMAND); if (cmd) return systemExecute(cmd) ? DITEM_FAILURE : DITEM_SUCCESS; diff --git a/release/sysinstall/dmenu.c b/release/sysinstall/dmenu.c index 3f76977..c806ab9 100644 --- a/release/sysinstall/dmenu.c +++ b/release/sysinstall/dmenu.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated for what's essentially a complete rewrite. * - * $Id: dmenu.c,v 1.32 1997/02/22 14:11:35 peter Exp $ + * $Id: dmenu.c,v 1.33 1997/06/13 14:21:19 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -115,7 +115,7 @@ dmenuSetKmapVariable(dialogMenuItem *tmp) int err; variable_set((char *)tmp->data); - lang = variable_get("keymap"); + lang = variable_get(VAR_KEYMAP); if (lang != NULL) { err = loadKeymap(lang); diff --git a/release/sysinstall/package.c b/release/sysinstall/package.c index 25cd40b..ff9415e 100644 --- a/release/sysinstall/package.c +++ b/release/sysinstall/package.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: package.c,v 1.62 1997/06/13 17:55:32 jkh Exp $ + * $Id: package.c,v 1.63 1997/09/16 10:14:22 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -64,7 +64,7 @@ packageAdd(dialogMenuItem *self) { char *cp; - cp = variable_get("package"); + cp = variable_get(VAR_PACKAGE); if (!cp) { msgDebug("packageAdd: No package name passed in package variable\n"); return DITEM_FAILURE; diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index 0b77928..fad032a 100644 --- a/release/sysinstall/sysinstall.h +++ b/release/sysinstall/sysinstall.h @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: sysinstall.h,v 1.139 1997/07/31 11:08:41 jkh Exp $ + * $Id: sysinstall.h,v 1.140 1997/09/16 18:57:17 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -106,7 +106,8 @@ #define VAR_DOMAINNAME "domainname" #define VAR_EDITOR "editor" #define VAR_EXTRAS "ifconfig_" -#define VAR_CONFIG_FILE "configFile" +#define VAR_COMMAND "command" +#define VAR_CONFIG_FILE "configFile" #define VAR_FTP_DIR "ftpDirectory" #define VAR_FTP_PASS "ftpPass" #define VAR_FTP_PATH "ftp" @@ -123,11 +124,13 @@ #define VAR_INSTALL_CFG "installConfig" #define VAR_INSTALL_ROOT "installRoot" #define VAR_IPADDR "ipaddr" +#define VAR_KEYMAP "keymap" #define VAR_LABEL "label" #define VAR_LABEL_COUNT "labelCount" #define VAR_MEDIA_TYPE "mediaType" #define VAR_MEDIA_TIMEOUT "MEDIA_TIMEOUT" #define VAR_NAMESERVER "nameserver" +#define VAR_NETINTERACTIVE "netInteractive" #define VAR_NETMASK "netmask" #define VAR_NETWORK_DEVICE "netDev" #define VAR_NFS_PATH "nfs" @@ -139,6 +142,8 @@ #define VAR_NO_WARN "noWarn" #define VAR_NONINTERACTIVE "nonInteractive" #define VAR_NOVELL "novell" +#define VAR_NTPDATE_FLAGS "ntpdate_flags" +#define VAR_PACKAGE "package" #define VAR_PARTITION "partition" #define VAR_PCNFSD "pcnfsd" #define VAR_PCNFSD_PKG "pcnfsd_pkg" diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c index f702e71..a78bc85 100644 --- a/release/sysinstall/tcpip.c +++ b/release/sysinstall/tcpip.c @@ -1,5 +1,5 @@ /* - * $Id: tcpip.c,v 1.70 1997/09/08 11:09:11 jkh Exp $ + * $Id: tcpip.c,v 1.71 1997/09/17 13:33:14 jkh Exp $ * * Copyright (c) 1995 * Gary J Palmer. All rights reserved. @@ -211,7 +211,8 @@ tcpOpenDialog(Device *devp) save = savescr(); /* If non-interactive, jump straight over the dialog crap and into config section */ - if (variable_get(VAR_NONINTERACTIVE) && !variable_get("netInteractive")) { + if (variable_get(VAR_NONINTERACTIVE) && + !variable_get(VAR_NETINTERACTIVE)) { if (!hostname[0]) msgConfirm("WARNING: hostname variable not set and is a non-optional\n" "parameter. Please add this to your installation script\n" |