From cd2937d3b704264039b4f3f3133cf7123c1d58ba Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Sat, 14 Nov 2009 21:00:43 +0000 Subject: [PATCH] Revert change from Fedora/RedHat where the now obsolete command INIT_CMD_CHANGECONS was introduced. Based on feedback and patch from Bill Nottingham. --- doc/Changelog | 8 ++++++++ src/init.c | 17 +---------------- src/initreq.h | 2 -- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index 0b4864a..bafbdb9 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,11 @@ +sysvinit (2.88dsf) UNRELEASED; urgency=low + + * Revert change from Fedora/RedHat where the now obsolete command + INIT_CMD_CHANGECONS was introduced. Based on feedback and patch + from Bill Nottingham. + + -- Petter Reinholdtsen Sun, 12 Jul 2009 19:58:10 +0200 + sysvinit (2.87dsf) world; urgency=low * Fix typos and do minor updates in the manual pages. diff --git a/src/init.c b/src/init.c index 4569cfe..9b47083 100644 --- a/src/init.c +++ b/src/init.c @@ -125,7 +125,6 @@ int sltime = 5; /* Sleep time between TERM and KILL */ char *argv0; /* First arguments; show up in ps listing */ int maxproclen; /* Maximal length of argv[0] with \0 */ struct utmp utproto; /* Only used for sizeof(utproto.ut_id) */ -char *user_console = NULL; /* User console device */ char *console_dev; /* Console device. */ int pipe_fd = -1; /* /dev/initctl */ int did_boot = 0; /* Did we already do BOOT* stuff? */ @@ -497,9 +496,7 @@ void console_init(void) int tried_vtmaster = 0; char *s; - if (user_console) { - console_dev = user_console; - } else if ((s = getenv("CONSOLE")) != NULL) + if ((s = getenv("CONSOLE")) != NULL) console_dev = s; else { console_dev = CONSOLE; @@ -2142,18 +2139,6 @@ void check_init_fifo(void) case INIT_CMD_SETENV: initcmd_setenv(request.i.data, sizeof(request.i.data)); break; - case INIT_CMD_CHANGECONS: - if (user_console) { - free(user_console); - user_console = NULL; - } - if (!request.i.bsd.reserved[0]) - user_console = NULL; - else - user_console = strdup(request.i.bsd.reserved); - console_init(); - quit = 1; - break; default: initlog(L_VB, "got unimplemented initrequest."); break; diff --git a/src/initreq.h b/src/initreq.h index f533594..757ffe0 100644 --- a/src/initreq.h +++ b/src/initreq.h @@ -41,8 +41,6 @@ #define INIT_CMD_SETENV 6 #define INIT_CMD_UNSETENV 7 -#define INIT_CMD_CHANGECONS 12345 - #ifdef MAXHOSTNAMELEN # define INITRQ_HLEN MAXHOSTNAMELEN #else