diff options
author | cheloha <cheloha@cvs.openbsd.org> | 2019-09-06 21:30:33 +0000 |
---|---|---|
committer | cheloha <cheloha@cvs.openbsd.org> | 2019-09-06 21:30:33 +0000 |
commit | 919dc092123983bb35156409fccdcb7768419002 (patch) | |
tree | 671ea1b36feb8d18bba22dda4190d53374d87bd8 | |
parent | 7f710b5b82f2d561673e148aaae2df207e486b5d (diff) |
options(4), config(8): drop dst/timezone knobs; ok kettenis@ deraadt@ jca@
-rw-r--r-- | share/man/man4/options.4 | 33 | ||||
-rw-r--r-- | share/man/man8/boot_config.8 | 13 | ||||
-rw-r--r-- | sys/kern/subr_userconf.c | 30 | ||||
-rw-r--r-- | usr.sbin/config/cmd.c | 35 | ||||
-rw-r--r-- | usr.sbin/config/config.8 | 13 | ||||
-rw-r--r-- | usr.sbin/config/ukc.h | 14 | ||||
-rw-r--r-- | usr.sbin/config/ukcutil.c | 19 |
7 files changed, 15 insertions, 142 deletions
diff --git a/share/man/man4/options.4 b/share/man/man4/options.4 index 419724adc46..5d14504e5f5 100644 --- a/share/man/man4/options.4 +++ b/share/man/man4/options.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: options.4,v 1.265 2019/05/05 19:06:56 jmc Exp $ +.\" $OpenBSD: options.4,v 1.266 2019/09/06 21:30:32 cheloha Exp $ .\" $NetBSD: options.4,v 1.21 1997/06/25 03:13:00 thorpej Exp $ .\" .\" Copyright (c) 1998 Theo de Raadt @@ -34,7 +34,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" -.Dd $Mdocdate: May 5 2019 $ +.Dd $Mdocdate: September 6 2019 $ .Dt OPTIONS 4 .Os .Sh NAME @@ -467,17 +467,6 @@ This option sets the number of pages available for the buffer cache. The default value is machine dependent, often calculated as between 5% and 10% of total available RAM. .Pp -.It Cd option DST= Ns Ar value -If -.Ar value -is non-zero, indicates that the hardware real-time clock device -is one hour ahead of the offset given in -.Sq TIMEZONE , -due to Daylight Saving Time (DST). -If -.Ar value -is zero, the hardware real-time clock device is not in Daylight Saving Time. -.Pp .It Cd option NKMEMPAGES= Ns Ar value .It Cd option NKMEMPAGES_MAX= Ns Ar value Size of kernel malloc area in PAGE_SIZE-sized logical pages. @@ -499,24 +488,6 @@ allows the bounds to be overridden in the kernel configuration file in the event the computed value is insufficient resulting in an .Dq out of space in kmem_map panic. -.Pp -.It Cd option \&"TIMEZONE= Ns Ar value Ns Cm \&" -.Ar value -indicates the time zone offset of the hardware real-time clock device, -in minutes, -from UTC. -It is useful when the hardware real-time clock device is configured -with local time, -when dual-booting -.Ox -with other operating systems on a single machine. -For instance, if the hardware real-time clock is set to Tokyo time, -.Ar value -should be -.Li \&-540 -as Tokyo local time is 9 hours ahead of UTC. -Double quotes are needed when specifying a negative -.Ar value . .El .Sh SCSI SUBSYSTEM OPTIONS See diff --git a/share/man/man8/boot_config.8 b/share/man/man8/boot_config.8 index 5ed079de8c6..3e5d606e573 100644 --- a/share/man/man8/boot_config.8 +++ b/share/man/man8/boot_config.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: boot_config.8,v 1.30 2016/03/10 09:04:11 jmc Exp $ +.\" $OpenBSD: boot_config.8,v 1.31 2019/09/06 21:30:32 cheloha Exp $ .\" .\" Copyright (c) 1996 Mats O Jansson .\" All rights reserved. @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: March 10 2016 $ +.Dd $Mdocdate: September 6 2019 $ .Dt BOOT_CONFIG 8 .Os .Sh NAME @@ -89,15 +89,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. .It Ic verbose Toggle the autoconfig verbose variable. .El diff --git a/sys/kern/subr_userconf.c b/sys/kern/subr_userconf.c index 7a1e245e6e9..a86660c0d28 100644 --- a/sys/kern/subr_userconf.c +++ b/sys/kern/subr_userconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_userconf.c,v 1.45 2017/04/30 16:45:46 mpi Exp $ */ +/* $OpenBSD: subr_userconf.c,v 1.46 2019/09/06 21:30:31 cheloha Exp $ */ /* * Copyright (c) 1996-2001 Mats O Jansson <moj@stacken.kth.se> @@ -40,7 +40,6 @@ extern short cfroots[]; extern int cfroots_size; extern int pv_size; extern short pv[]; -extern struct timezone tz; extern char *pdevnames[]; extern int pdevnames_size; extern struct pdevinit pdevinit[]; @@ -107,7 +106,6 @@ char *userconf_cmds[] = { "lines", "L", "quit", "q", "show", "s", - "timezone", "t", "verbose", "v", "?", "h", "", "", @@ -736,9 +734,6 @@ userconf_help(void) printf("[attr [val]] " "show attributes (or devices with an attribute)"); break; - case 't': - printf("[mins [dst]] set timezone/dst"); - break; case 'v': printf(" toggle verbose booting"); break; @@ -1314,29 +1309,6 @@ userconf_parse(char *cmd) else userconf_show_attr(c); break; - case 't': - if (*c == '\0' || - userconf_number(c, &a, INT_MAX) == 0) { - if (*c != '\0') { - tz.tz_minuteswest = a; - while (*c != '\n' && *c != '\t' && - *c != ' ' && *c != '\0') - c++; - while (*c == '\t' || *c == ' ') - c++; - if (*c != '\0' && userconf_number(c, - &a, INT_MAX) == 0) - tz.tz_dsttime = a; - userconf_hist_cmd('t'); - userconf_hist_int(tz.tz_minuteswest); - userconf_hist_int(tz.tz_dsttime); - userconf_hist_eoc(); - } - printf("timezone = %d, dst = %d\n", - tz.tz_minuteswest, tz.tz_dsttime); - } else - printf("Unknown argument\n"); - break; case 'v': autoconf_verbose = !autoconf_verbose; printf("autoconf verbose %sabled\n", 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++; |