Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sh3/dev Make options SCIFCONSOLE patchable via a va...
details: https://anonhg.NetBSD.org/src/rev/c84dff5a4a06
branches: trunk
changeset: 342099:c84dff5a4a06
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Dec 06 02:21:55 2015 +0000
description:
Make options SCIFCONSOLE patchable via a variable using gdb(1) etc.
Tested on dreamcast.
diffstat:
sys/arch/sh3/dev/scif.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diffs (45 lines):
diff -r 3e7f7522b5de -r c84dff5a4a06 sys/arch/sh3/dev/scif.c
--- a/sys/arch/sh3/dev/scif.c Sun Dec 06 02:04:10 2015 +0000
+++ b/sys/arch/sh3/dev/scif.c Sun Dec 06 02:21:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scif.c,v 1.65 2014/11/15 19:20:01 christos Exp $ */
+/* $NetBSD: scif.c,v 1.66 2015/12/06 02:21:55 tsutsui Exp $ */
/*-
* Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu. All rights reserved.
@@ -93,7 +93,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scif.c,v 1.65 2014/11/15 19:20:01 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scif.c,v 1.66 2015/12/06 02:21:55 tsutsui Exp $");
#include "opt_kgdb.h"
#include "opt_scif.h"
@@ -223,6 +223,10 @@
.d_flag = D_TTY
};
+#ifndef SCIFCONSOLE
+#define SCIFCONSOLE 0
+#endif
+int scifconsole = SCIFCONSOLE; /* patchable */
/* struct tty */
static void scifstart(struct tty *);
@@ -1424,11 +1428,10 @@
/* Initialize required fields. */
cp->cn_dev = makedev(maj, 0);
-#ifdef SCIFCONSOLE
- cp->cn_pri = CN_REMOTE;
-#else
- cp->cn_pri = CN_NORMAL;
-#endif
+ if (scifconsole)
+ cp->cn_pri = CN_REMOTE;
+ else
+ cp->cn_pri = CN_NORMAL;
}
void
Home |
Main Index |
Thread Index |
Old Index