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 /usr.sbin/sade | |
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 'usr.sbin/sade')
-rw-r--r-- | usr.sbin/sade/config.c | 12 | ||||
-rw-r--r-- | usr.sbin/sade/dispatch.c | 4 | ||||
-rw-r--r-- | usr.sbin/sade/dmenu.c | 4 | ||||
-rw-r--r-- | usr.sbin/sade/sade.h | 9 |
4 files changed, 19 insertions, 10 deletions
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index cb70bce..2b37c89 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/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/usr.sbin/sade/dispatch.c b/usr.sbin/sade/dispatch.c index 181ccd5..67e09d6 100644 --- a/usr.sbin/sade/dispatch.c +++ b/usr.sbin/sade/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/usr.sbin/sade/dmenu.c b/usr.sbin/sade/dmenu.c index 3f76977..c806ab9 100644 --- a/usr.sbin/sade/dmenu.c +++ b/usr.sbin/sade/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/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index 0b77928..fad032a 100644 --- a/usr.sbin/sade/sade.h +++ b/usr.sbin/sade/sade.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" |