From e490201afdcf65026d706b7ce6496df7a7822c8c Mon Sep 17 00:00:00 2001 From: skrll Date: Mon, 13 Apr 2020 11:43:27 +0000 Subject: Handle "no count" properly in db_kernhist_print_cmd --- sys/ddb/db_command.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sys/ddb/db_command.c') diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index b2a21da5689..bf809393851 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -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 -__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, bool have_addr, if (!have_addr) addr = 0; + + if (count == -1) + count = 0; + kernhist_print((void *)(uintptr_t)addr, count, modif, db_printf); } #endif -- cgit