Date: Wed, 9 Jul 2003 12:12:52 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 34259 for review Message-ID: <200307091912.h69JCq4e045483@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=34259 Change 34259 by jhb@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@pci%d:%d:%d:\tclass=0x%06x card=0x%08x " "chip=0x%08x rev=0x%02x hdr=0x%02x\n", (name && *name) ? name : "none",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307091912.h69JCq4e045483>