Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Jan 2016 17:32:20 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295098 - head/sys/kern
Message-ID:  <201601311732.u0VHWKuN036629@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Sun Jan 31 17:32:20 2016
New Revision: 295098
URL: https://svnweb.freebsd.org/changeset/base/295098

Log:
  Fix the logic in the ddb command 'show ktr /a'. Prior to r118269 it would
  print until cncheckc returned a non -1, i.e. a character had been entered.
  After this change it would print only if cncheckc returned a character.
  As this was before each call to db_mach_vtrace the normal outcome was
  nothing was printed.
  
  With this change 'show ktr /a' will now keep printing until the user stops
  the command with a key press, or there is no more entries to print.

Modified:
  head/sys/kern/kern_ktr.c

Modified: head/sys/kern/kern_ktr.c
==============================================================================
--- head/sys/kern/kern_ktr.c	Sun Jan 31 16:55:52 2016	(r295097)
+++ head/sys/kern/kern_ktr.c	Sun Jan 31 17:32:20 2016	(r295098)
@@ -419,7 +419,7 @@ DB_SHOW_COMMAND(ktr, db_ktr_all)
 	db_ktr_verbose |= (strchr(modif, 'V') != NULL) ? 1 : 0; /* just timestap please */
 	if (strchr(modif, 'a') != NULL) {
 		db_disable_pager();
-		while (cncheckc() != -1)
+		while (cncheckc() == -1)
 			if (db_mach_vtrace() == 0)
 				break;
 	} else {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601311732.u0VHWKuN036629>