From owner-p4-projects@FreeBSD.ORG Wed Jul 9 12:12:54 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C203037B404; Wed, 9 Jul 2003 12:12:53 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 785BC37B401 for ; Wed, 9 Jul 2003 12:12:53 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F18D43F75 for ; Wed, 9 Jul 2003 12:12:53 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h69JCq0U045489 for ; Wed, 9 Jul 2003 12:12:52 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h69JCq4e045483 for perforce@freebsd.org; Wed, 9 Jul 2003 12:12:52 -0700 (PDT) Date: Wed, 9 Jul 2003 12:12:52 -0700 (PDT) Message-Id: <200307091912.h69JCq4e045483@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 34259 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2003 19:12:54 -0000 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",