summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-08-19 23:56:01 +0000
committerpeter <peter@FreeBSD.org>2002-08-19 23:56:01 +0000
commit1b3d460b3111516b594c12754100269e85757487 (patch)
tree0105941701b7263c1e07ac5a2b24c21e79160fed /sys/dev/syscons
parentf8ad2e529c58d434210bee5a414f6df304f21f95 (diff)
downloadFreeBSD-src-1b3d460b3111516b594c12754100269e85757487.zip
FreeBSD-src-1b3d460b3111516b594c12754100269e85757487.tar.gz
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.
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/schistory.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/dev/syscons/schistory.c b/sys/dev/syscons/schistory.c
index 3df7682..30cbdfd 100644
--- a/sys/dev/syscons/schistory.c
+++ b/sys/dev/syscons/schistory.c
@@ -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 */
OpenPOWER on IntegriCloud