summaryrefslogtreecommitdiff
path: root/usr.sbin/config
diff options
context:
space:
mode:
authorcheloha <cheloha@cvs.openbsd.org>2019-09-06 21:30:33 +0000
committercheloha <cheloha@cvs.openbsd.org>2019-09-06 21:30:33 +0000
commit919dc092123983bb35156409fccdcb7768419002 (patch)
tree671ea1b36feb8d18bba22dda4190d53374d87bd8 /usr.sbin/config
parent7f710b5b82f2d561673e148aaae2df207e486b5d (diff)
options(4), config(8): drop dst/timezone knobs; ok kettenis@ deraadt@ jca@
Diffstat (limited to 'usr.sbin/config')
-rw-r--r--usr.sbin/config/cmd.c35
-rw-r--r--usr.sbin/config/config.813
-rw-r--r--usr.sbin/config/ukc.h14
-rw-r--r--usr.sbin/config/ukcutil.c19
4 files changed, 10 insertions, 71 deletions
diff --git a/usr.sbin/config/cmd.c b/usr.sbin/config/cmd.c
index 5b611b084c8..61a6fa6c7c4 100644
--- a/usr.sbin/config/cmd.c
+++ b/usr.sbin/config/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.21 2019/08/11 17:08:33 deraadt Exp $ */
+/* $OpenBSD: cmd.c,v 1.22 2019/09/06 21:30:31 cheloha Exp $ */
/*
* Copyright (c) 1999-2001 Mats O Jansson. All rights reserved.
@@ -26,7 +26,6 @@
#include <sys/types.h>
#include <sys/device.h>
-#include <sys/time.h>
#include <ctype.h>
#include <limits.h>
@@ -57,7 +56,6 @@ cmd_table_t cmd_table[] = {
{"show", Xshow, "[attr [val]]", "Show attribute"},
{"exit", Xexit, "", "Exit, without saving changes"},
{"quit", Xquit, "", "Quit, saving current changes"},
- {"timezone", Xtimezone, "[mins [dst]]", "Show/change timezone"},
{"nkmempg", Xnkmempg, "[number]", "Show/change NKMEMPAGES"},
{NULL, NULL, NULL, NULL}
};
@@ -245,37 +243,6 @@ Xexit(cmd_t *cmd)
return (CMD_EXIT);
}
-int
-Xtimezone(cmd_t *cmd)
-{
- struct timezone *tz;
- int num;
- char *c;
-
- ukc_mod_kernel = 1;
- tz = (struct timezone *)adjust((caddr_t)(nl[TZ_TZ].n_value));
-
- if (strlen(cmd->args) == 0) {
- printf("timezone = %d, dst = %d\n",
- tz->tz_minuteswest, tz->tz_dsttime);
- } else {
- if (number(cmd->args, &num) == 0) {
- tz->tz_minuteswest = num;
- c = cmd->args;
- while ((*c != '\0') && !isspace((unsigned char)*c))
- c++;
- while (isspace((unsigned char)*c))
- c++;
- if (strlen(c) != 0 && number(c, &num) == 0)
- tz->tz_dsttime = num;
- printf("timezone = %d, dst = %d\n",
- tz->tz_minuteswest, tz->tz_dsttime);
- } else
- printf("Unknown argument\n");
- }
- return (CMD_CONT);
-}
-
void
int_variable_adjust(const cmd_t *cmd, int idx, const char *name)
{
diff --git a/usr.sbin/config/config.8 b/usr.sbin/config/config.8
index 7cdf1870ebd..d8dcd468fe1 100644
--- a/usr.sbin/config/config.8
+++ b/usr.sbin/config/config.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: config.8,v 1.69 2019/08/11 17:08:33 deraadt Exp $
+.\" $OpenBSD: config.8,v 1.70 2019/09/06 21:30:31 cheloha Exp $
.\" $NetBSD: config.8,v 1.10 1996/08/31 20:58:16 mycroft Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" from: @(#)config.8 8.2 (Berkeley) 4/19/94
.\"
-.Dd $Mdocdate: August 11 2019 $
+.Dd $Mdocdate: September 6 2019 $
.Dt CONFIG 8
.Os
.Sh NAME
@@ -316,15 +316,6 @@ Show all devices for which attribute
.Ar attr
has the value
.Ar val .
-.It Ic timezone Op Ar minuteswest Op Ar dst
-Change the
-.Va tz
-timezone structure.
-.Va minuteswest
-is the number of minutes west of GMT and
-.Va dst
-is non-zero if Daylight Saving Time is in effect.
-Without arguments, displays its current value.
.El
.Sh EXAMPLES
The Ethernet card is not detected at boot because the kernel configuration
diff --git a/usr.sbin/config/ukc.h b/usr.sbin/config/ukc.h
index 071437b9b70..d4125e79ce1 100644
--- a/usr.sbin/config/ukc.h
+++ b/usr.sbin/config/ukc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukc.h,v 1.16 2019/08/13 21:36:18 deraadt Exp $ */
+/* $OpenBSD: ukc.h,v 1.17 2019/09/06 21:30:31 cheloha Exp $ */
/*
* Copyright (c) 1999-2001 Mats O Jansson. All rights reserved.
@@ -41,12 +41,11 @@
#define I_TEXTRALOC 11
#define I_HISTLEN 12
#define CA_HISTORY 13
-#define TZ_TZ 14
-#define P_PDEVNAMES 15
-#define I_PDEVSIZE 16
-#define S_PDEVINIT 17
-#define I_NKMEMPG 18
-#define NLENTRIES 19
+#define P_PDEVNAMES 14
+#define I_PDEVSIZE 15
+#define S_PDEVINIT 16
+#define I_NKMEMPG 17
+#define NLENTRIES 18
#ifdef UKC_MAIN
struct nlist nl[] = {
@@ -64,7 +63,6 @@ struct nlist nl[] = {
{ "_textraloc" },
{ "_userconf_histlen" },
{ "_userconf_history" },
- { "_tz" },
{ "_pdevnames" },
{ "_pdevnames_size" },
{ "_pdevinit" },
diff --git a/usr.sbin/config/ukcutil.c b/usr.sbin/config/ukcutil.c
index 19053115107..be117c6bd84 100644
--- a/usr.sbin/config/ukcutil.c
+++ b/usr.sbin/config/ukcutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukcutil.c,v 1.24 2019/05/14 13:44:25 tedu Exp $ */
+/* $OpenBSD: ukcutil.c,v 1.25 2019/09/06 21:30:31 cheloha Exp $ */
/*
* Copyright (c) 1999-2001 Mats O Jansson. All rights reserved.
@@ -25,7 +25,6 @@
*/
#include <sys/types.h>
-#include <sys/time.h>
#include <sys/device.h>
#include <ctype.h>
@@ -1398,7 +1397,6 @@ process_history(int len, char *buf)
char *c;
int devno, newno;
short unit, state;
- struct timezone *tz;
if (len == 0) {
printf("History is empty\n");
@@ -1469,21 +1467,6 @@ process_history(int len, char *buf)
c++;
c++;
break;
- case 't':
- c++;
- c++;
- tz = (struct timezone *)adjust((caddr_t)nl[TZ_TZ].
- n_value);
- tz->tz_minuteswest = atoi(c);
- while (*c != ' ')
- c++;
- c++;
- tz->tz_dsttime = atoi(c);
- while (*c != '\n')
- c++;
- c++;
- ukc_mod_kernel = 1;
- break;
case 'q':
while (*c != '\0')
c++;