Module Name:    src
Committed By:   skrll
Date:           Mon Apr 13 11:43:27 UTC 2020

Modified Files:
        src/sys/ddb: db_command.c

Log Message:
Handle "no count" properly in db_kernhist_print_cmd


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/ddb/db_command.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_command.c
diff -u src/sys/ddb/db_command.c:1.169 src/sys/ddb/db_command.c:1.170
--- src/sys/ddb/db_command.c:1.169	Tue Mar 10 15:58:36 2020
+++ src/sys/ddb/db_command.c	Mon Apr 13 11:43:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.169 2020/03/10 15:58:36 christos Exp $	*/
+/*	$NetBSD: db_command.c,v 1.170 2020/04/13 11:43:27 skrll Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009, 2019
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.169 2020/03/10 15:58:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.170 2020/04/13 11:43:27 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -1290,6 +1290,10 @@ db_kernhist_print_cmd(db_expr_t addr, bo
 
 	if (!have_addr)
 		addr = 0;
+
+	if (count == -1)
+		count = 0;
+
 	kernhist_print((void *)(uintptr_t)addr, count, modif, db_printf);
 }
 #endif

Reply via email to