Module Name:    src
Committed By:   martin
Date:           Sun Jan 26 11:25:22 UTC 2020

Modified Files:
        src/sys/ddb [netbsd-9]: db_input.c db_lex.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #655):

        sys/ddb/db_input.c: revision 1.27
        sys/ddb/db_lex.c: revision 1.23

Print db> prompt in db_read_line(), not db_readline().
The former is what DDB repl calls.  The latter performs the actual
input so let other code use it without the unwanted db> prompt.  It's
already used by ACPI (and AcpiOsWaitCommandReady supplies its own
prompt).  I also use it for my uncommitted Forth scripting for DDB.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.64.1 src/sys/ddb/db_input.c
cvs rdiff -u -r1.22 -r1.22.60.1 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_input.c
diff -u src/sys/ddb/db_input.c:1.26 src/sys/ddb/db_input.c:1.26.64.1
--- src/sys/ddb/db_input.c:1.26	Tue Aug 31 07:48:23 2010
+++ src/sys/ddb/db_input.c	Sun Jan 26 11:25:22 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_input.c,v 1.26 2010/08/31 07:48:23 enami Exp $	*/
+/*	$NetBSD: db_input.c,v 1.26.64.1 2020/01/26 11:25:22 martin Exp $	*/
 
 /*
  * Mach Operating System
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_input.c,v 1.26 2010/08/31 07:48:23 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_input.c,v 1.26.64.1 2020/01/26 11:25:22 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddbparam.h"
@@ -38,7 +38,6 @@ __KERNEL_RCSID(0, "$NetBSD: db_input.c,v
 
 #include <sys/param.h>
 #include <sys/proc.h>
-#include <sys/cpu.h>
 
 #include <ddb/ddb.h>
 
@@ -352,11 +351,6 @@ int
 db_readline(char *lstart, int lsize)
 {
 
-# ifdef MULTIPROCESSOR
-	db_printf("db{%ld}> ", (long)cpu_number());
-# else
-	db_printf("db> ");
-# endif
 	db_force_whitespace();	/* synch output position */
 
 	db_lbuf_start = lstart;

Index: src/sys/ddb/db_lex.c
diff -u src/sys/ddb/db_lex.c:1.22 src/sys/ddb/db_lex.c:1.22.60.1
--- src/sys/ddb/db_lex.c:1.22	Thu May 26 15:34:14 2011
+++ src/sys/ddb/db_lex.c	Sun Jan 26 11:25:22 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_lex.c,v 1.22 2011/05/26 15:34:14 joerg Exp $	*/
+/*	$NetBSD: db_lex.c,v 1.22.60.1 2020/01/26 11:25:22 martin Exp $	*/
 
 /*
  * Mach Operating System
@@ -34,10 +34,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_lex.c,v 1.22 2011/05/26 15:34:14 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_lex.c,v 1.22.60.1 2020/01/26 11:25:22 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/cpu.h>
 
 #include <ddb/ddb.h>
 
@@ -61,6 +62,11 @@ db_read_line(void)
 {
 	int	i;
 
+#ifdef MULTIPROCESSOR
+	db_printf("db{%ld}> ", (long)cpu_number());
+#else
+	db_printf("db> ");
+#endif
 	i = db_readline(db_line, sizeof(db_line));
 	if (i == 0)
 		return (0);	/* EOI */

Reply via email to