svn commit: r295098 - head/sys/kern

Andrew Turner andrew at FreeBSD.org
Sun Jan 31 17:32:22 UTC 2016


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 {


More information about the svn-src-head mailing list