PERFORCE change 34259 for review
John Baldwin
jhb at FreeBSD.org
Wed Jul 9 12:12:54 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=34259
Change 34259 by jhb at jhb_laptop on 2003/07/09 12:12:04
Port 'show pciregs' to the simple pager.
Affected files ...
.. //depot/projects/smpng/sys/dev/pci/pci.c#29 edit
Differences ...
==== //depot/projects/smpng/sys/dev/pci/pci.c#29 (text+ko) ====
@@ -1274,19 +1274,19 @@
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 @@
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 at pci%d:%d:%d:\tclass=0x%06x card=0x%08x "
"chip=0x%08x rev=0x%02x hdr=0x%02x\n",
(name && *name) ? name : "none",
More information about the p4-projects
mailing list