Drop config(8) support for getting/setting the kernel timezone.
ok?
Index: cmd.c
===================================================================
RCS file: /cvs/src/usr.sbin/config/cmd.c,v
retrieving revision 1.20
diff -u -p -r1.20 cmd.c
--- cmd.c 23 Nov 2013 17:38:15 -0000 1.20
+++ cmd.c 8 Aug 2019 02:39:33 -0000
@@ -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"},
{"bufcachepercent", Xbufcachepct, "[number]",
"Show/change BUFCACHEPERCENT"},
{"nkmempg", Xnkmempg, "[number]", "Show/change NKMEMPAGES"},
@@ -245,37 +243,6 @@ Xexit(cmd_t *cmd)
{
/* Nothing to do here */
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
Index: ukcutil.c
===================================================================
RCS file: /cvs/src/usr.sbin/config/ukcutil.c,v
retrieving revision 1.24
diff -u -p -r1.24 ukcutil.c
--- ukcutil.c 14 May 2019 13:44:25 -0000 1.24
+++ ukcutil.c 8 Aug 2019 02:39:33 -0000
@@ -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");
@@ -1468,21 +1466,6 @@ process_history(int len, char *buf)
while (*c != '\n')
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')
Index: ukc.h
===================================================================
RCS file: /cvs/src/usr.sbin/config/ukc.h,v
retrieving revision 1.14
diff -u -p -r1.14 ukc.h
--- ukc.h 27 Sep 2017 15:14:52 -0000 1.14
+++ ukc.h 8 Aug 2019 02:39:33 -0000
@@ -41,14 +41,13 @@
#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_NMBCLUSTERS 18
-#define I_BUFCACHEPCT 19
-#define I_NKMEMPG 20
-#define NLENTRIES 21
+#define P_PDEVNAMES 14
+#define I_PDEVSIZE 15
+#define S_PDEVINIT 16
+#define I_NMBCLUSTERS 17
+#define I_BUFCACHEPCT 18
+#define I_NKMEMPG 19
+#define NLENTRIES 20
#ifdef UKC_MAIN
struct nlist nl[] = {
@@ -66,7 +65,6 @@ struct nlist nl[] = {
{ "_textraloc" },
{ "_userconf_histlen" },
{ "_userconf_history" },
- { "_tz" },
{ "_pdevnames" },
{ "_pdevnames_size" },
{ "_pdevinit" },
@@ -90,7 +88,6 @@ struct nlist knl[] = {
{ "_textraloc" },
{ "_userconf_histlen" },
{ "_userconf_history" },
- { "_tz" },
{ "_pdevnames" },
{ "_pdevnames_size" },
{ "_pdevinit" },
Index: config.8
===================================================================
RCS file: /cvs/src/usr.sbin/config/config.8,v
retrieving revision 1.68
diff -u -p -r1.68 config.8
--- config.8 19 Jul 2019 20:40:44 -0000 1.68
+++ config.8 8 Aug 2019 02:39:33 -0000
@@ -319,15 +319,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