summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_ktr.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-07-31 17:29:42 +0000
committerjhb <jhb@FreeBSD.org>2003-07-31 17:29:42 +0000
commitbc9db472d846e3b60c0fd5e39702ea355dba8046 (patch)
tree5db3617451813940f0d0b379782cdd6ffffcd685 /sys/kern/kern_ktr.c
parent7a022c490241980d564815f3a9eb35f1899334d6 (diff)
downloadFreeBSD-src-bc9db472d846e3b60c0fd5e39702ea355dba8046.zip
FreeBSD-src-bc9db472d846e3b60c0fd5e39702ea355dba8046.tar.gz
Update the 'ps', 'show pci', and 'show ktr' ddb commands to use the new
pager callout instead of homerolling their own paging facility.
Diffstat (limited to 'sys/kern/kern_ktr.c')
-rw-r--r--sys/kern/kern_ktr.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/sys/kern/kern_ktr.c b/sys/kern/kern_ktr.c
index 13d0526..321e86f 100644
--- a/sys/kern/kern_ktr.c
+++ b/sys/kern/kern_ktr.c
@@ -267,9 +267,9 @@ static int db_mach_vtrace(void);
DB_SHOW_COMMAND(ktr, db_ktr_all)
{
- int c, lines;
- int all = 0;
-
+ int c, quit;
+
+ quit = 0;
lines = NUM_LINES_PER_PAGE;
tstate.cur = (ktr_idx - 1) & (KTR_ENTRIES - 1);
tstate.first = -1;
@@ -277,28 +277,16 @@ DB_SHOW_COMMAND(ktr, db_ktr_all)
db_ktr_verbose = 1;
else
db_ktr_verbose = 0;
- if (strcmp(modif, "a") == 0)
- all = 1;
- while (db_mach_vtrace())
- if (all) {
- if (cncheckc() != -1)
- return;
- } else if (--lines == 0) {
- db_printf("--More--");
- c = cngetc();
- db_printf("\r");
- switch (c) {
- case '\n': /* one more line */
- lines = 1;
+ if (strcmp(modif, "a") == 0) {
+ while (cncheckc() != -1)
+ if (db_mach_vtrace() == 0)
break;
- case ' ': /* one more page */
- lines = NUM_LINES_PER_PAGE;
+ } else {
+ db_setup_paging(db_simple_pager, &quit, DB_LINES_PER_PAGE);
+ while (!quit)
+ if (db_mach_vtrace() == 0)
break;
- default:
- db_printf("\n");
- return;
- }
- }
+ }
}
static int
OpenPOWER on IntegriCloud