Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ddb Handle "no count" properly in db_kernhist_print_cmd



details:   https://anonhg.NetBSD.org/src/rev/04565accb111
branches:  trunk
changeset: 930749:04565accb111
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Apr 13 11:43:27 2020 +0000

description:
Handle "no count" properly in db_kernhist_print_cmd

diffstat:

 sys/ddb/db_command.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r a36aef103ccd -r 04565accb111 sys/ddb/db_command.c
--- a/sys/ddb/db_command.c      Mon Apr 13 11:27:22 2020 +0000
+++ b/sys/ddb/db_command.c      Mon Apr 13 11:43:27 2020 +0000
@@ -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 @@
 
        if (!have_addr)
                addr = 0;
+
+       if (count == -1)
+               count = 0;
+
        kernhist_print((void *)(uintptr_t)addr, count, modif, db_printf);
 }
 #endif



Home | Main Index | Thread Index | Old Index