de-count schistory.c. The handling of NSC was rather bogus here and was

little more than a place holder, because nothing actually counted the
number of 'sc' units to compare it against NSC.  A bit more work here
is needed so that the scaling of SC_MAX_HISTORY_SIZE and extra_history_size
goes up when more sc units are added.  But, it does not appear that we can
have more than one console yet, so it does not seem particularly urgent.
This commit is contained in:
Peter Wemm 2002-08-19 23:56:01 +00:00
parent 80ee2492c5
commit f457830b8e

View File

@ -29,7 +29,6 @@
* $FreeBSD$
*/
#include "sc.h"
#include "opt_syscons.h"
#ifndef SC_NO_HISTORY
@ -46,17 +45,27 @@
#include <dev/syscons/syscons.h>
/*
* XXX Placeholder.
* This calculations should be dynamically scaled by number of seperate sc
* devices. A base value of 'extra_history_size' should be defined for
* each syscons unit, and added and subtracted from the dynamic
* 'extra_history_size' as units are added and removed. This way, each time
* a new syscons unit goes online, extra_history_size is automatically bumped.
*/
#define MAXSC 1
#if !defined(SC_MAX_HISTORY_SIZE)
#define SC_MAX_HISTORY_SIZE (1000 * MAXCONS * NSC)
#define SC_MAX_HISTORY_SIZE (1000 * MAXCONS * MAXSC)
#endif
#if !defined(SC_HISTORY_SIZE)
#define SC_HISTORY_SIZE (ROW * 4)
#endif
#if (SC_HISTORY_SIZE * MAXCONS * NSC) > SC_MAX_HISTORY_SIZE
#if (SC_HISTORY_SIZE * MAXCONS * MAXSC) > SC_MAX_HISTORY_SIZE
#undef SC_MAX_HISTORY_SIZE
#define SC_MAX_HISTORY_SIZE (SC_HISTORY_SIZE * MAXCONS * NSC)
#define SC_MAX_HISTORY_SIZE (SC_HISTORY_SIZE * MAXCONS * MAXSC)
#endif
/* local variables */