Module Name: src
Committed By: martin
Date: Sun Mar 1 12:45:09 UTC 2020
Modified Files:
src/sys/ddb [netbsd-9]: db_lex.c
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #746):
sys/ddb/db_lex.c: revision 1.25
Fix crash(8). Will revisit.
To generate a diff of this commit:
cvs rdiff -u -r1.22.60.1 -r1.22.60.2 src/sys/ddb/db_lex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/ddb/db_lex.c
diff -u src/sys/ddb/db_lex.c:1.22.60.1 src/sys/ddb/db_lex.c:1.22.60.2
--- src/sys/ddb/db_lex.c:1.22.60.1 Sun Jan 26 11:25:22 2020
+++ src/sys/ddb/db_lex.c Sun Mar 1 12:45:09 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: db_lex.c,v 1.22.60.1 2020/01/26 11:25:22 martin Exp $ */
+/* $NetBSD: db_lex.c,v 1.22.60.2 2020/03/01 12:45:09 martin Exp $ */
/*
* Mach Operating System
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_lex.c,v 1.22.60.1 2020/01/26 11:25:22 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_lex.c,v 1.22.60.2 2020/03/01 12:45:09 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -62,11 +62,18 @@ db_read_line(void)
{
int i;
+#ifdef _KERNEL
+ /*
+ * crash(8) prints the prompt using libedit. That's why we used to
+ * print it in db_readline(). But now people are using db_read_line()
+ * for general purpose input, so..
+ */
#ifdef MULTIPROCESSOR
db_printf("db{%ld}> ", (long)cpu_number());
#else
db_printf("db> ");
#endif
+#endif
i = db_readline(db_line, sizeof(db_line));
if (i == 0)
return (0); /* EOI */