From 3d989d58d871a2fbabf76fda46fea9780ed4ed5f Mon Sep 17 00:00:00 2001 From: Nate Williams Date: Tue, 19 Nov 1996 17:08:10 +0000 Subject: [PATCH] Fix UserConfig w/syscons. The 'getchar' function in syscons (sccngetc) is used by UserConfig to get keyboard input from the user. When it was modified to use the shared keyboard port routines it used the port passed in during the probe routine. Since the probe routine was not yet called, the port was set to 0, which is obviously not going to work. Pre-initialize sc_port to IO_KBD which is really a kludge, but it's how the previous driver did it's job. Found by: remote GDB --- sys/dev/syscons/syscons.c | 4 ++-- sys/i386/isa/syscons.c | 4 ++-- sys/isa/syscons.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 578f6f5c4d75..8b9fff188bba 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.187 1996/11/14 22:19:14 sos Exp $ + * $Id: syscons.c,v 1.188 1996/11/15 08:45:24 sos Exp $ */ #include "sc.h" @@ -102,7 +102,7 @@ static scr_stat *new_scp, *old_scp; static term_stat kernel_console; static default_attr *current_default; static int flags = 0; -static int sc_port; +static int sc_port = IO_KBD; static char init_done = COLD; static u_short sc_buffer[ROW*COL]; static char switch_in_progress = FALSE; diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c index 578f6f5c4d75..8b9fff188bba 100644 --- a/sys/i386/isa/syscons.c +++ b/sys/i386/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.187 1996/11/14 22:19:14 sos Exp $ + * $Id: syscons.c,v 1.188 1996/11/15 08:45:24 sos Exp $ */ #include "sc.h" @@ -102,7 +102,7 @@ static scr_stat *new_scp, *old_scp; static term_stat kernel_console; static default_attr *current_default; static int flags = 0; -static int sc_port; +static int sc_port = IO_KBD; static char init_done = COLD; static u_short sc_buffer[ROW*COL]; static char switch_in_progress = FALSE; diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c index 578f6f5c4d75..8b9fff188bba 100644 --- a/sys/isa/syscons.c +++ b/sys/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.187 1996/11/14 22:19:14 sos Exp $ + * $Id: syscons.c,v 1.188 1996/11/15 08:45:24 sos Exp $ */ #include "sc.h" @@ -102,7 +102,7 @@ static scr_stat *new_scp, *old_scp; static term_stat kernel_console; static default_attr *current_default; static int flags = 0; -static int sc_port; +static int sc_port = IO_KBD; static char init_done = COLD; static u_short sc_buffer[ROW*COL]; static char switch_in_progress = FALSE;