diff options
author | jhb <jhb@FreeBSD.org> | 2003-07-31 17:29:42 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-07-31 17:29:42 +0000 |
commit | bc9db472d846e3b60c0fd5e39702ea355dba8046 (patch) | |
tree | 5db3617451813940f0d0b379782cdd6ffffcd685 /sys/dev/pci | |
parent | 7a022c490241980d564815f3a9eb35f1899334d6 (diff) | |
download | FreeBSD-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/dev/pci')
-rw-r--r-- | sys/dev/pci/pci.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index f4681f1..e8e8245 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1274,19 +1274,19 @@ DB_SHOW_COMMAND(pciregs, db_pci_dump) struct devlist *devlist_head; struct pci_conf *p; const char *name; - int i, error, none_count, nl; + int i, error, none_count, quit; none_count = 0; - nl = 0; /* get the head of the device queue */ devlist_head = &pci_devq; /* * Go through the list of devices and print out devices */ - for (error = 0, i = 0, + db_setup_paging(db_simple_pager, &quit, DB_LINES_PER_PAGE); + for (error = 0, i = 0, quit = 0, dinfo = STAILQ_FIRST(devlist_head); - (dinfo != NULL) && (error == 0) && (i < pci_numdevs); + (dinfo != NULL) && (error == 0) && (i < pci_numdevs) && !quit; dinfo = STAILQ_NEXT(dinfo, pci_links), i++) { /* Populate pd_name and pd_unit */ @@ -1295,31 +1295,6 @@ DB_SHOW_COMMAND(pciregs, db_pci_dump) name = device_get_name(dinfo->cfg.dev); p = &dinfo->conf; - /* - * XXX just take 20 for now... - */ - if (nl++ == 20) { - int c; - - db_printf("--More--"); - c = cngetc(); - db_printf("\r"); - /* - * A whole screenfull or just one line? - */ - switch (c) { - case '\n': /* just one line */ - nl = 20; - break; - case ' ': - nl = 0; /* another screenfull */ - break; - default: /* exit */ - db_printf("\n"); - return; - } - } - db_printf("%s%d@pci%d:%d:%d:\tclass=0x%06x card=0x%08x " "chip=0x%08x rev=0x%02x hdr=0x%02x\n", (name && *name) ? name : "none", |