aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pci/pci.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2006-07-12 21:22:44 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2006-07-12 21:22:44 +0000
commit19e9205a23a412d9e48707fc012db23116ccf282 (patch)
treef2aff187736391b024e6cf6f28e95e5708a2d927 /sys/dev/pci/pci.c
parent243d8ac855e2702cccf8b7ebd7e3e4d1f570dda4 (diff)
downloadsrc-19e9205a23a412d9e48707fc012db23116ccf282.tar.gz
src-19e9205a23a412d9e48707fc012db23116ccf282.zip
Simplify the pager support in DDB. Allowing different db commands to
install custom pager functions didn't actually happen in practice (they all just used the simple pager and passed in a local quit pointer). So, just hardcode the simple pager as the only pager and make it set a global db_pager_quit flag that db commands can check when the user hits 'q' (or a suitable variant) at the pager prompt. Also, now that it's easy to do so, enable paging by default for all ddb commands. Any command that wishes to honor the quit flag can do so by checking db_pager_quit. Note that the pager can also be effectively disabled by setting $lines to 0. Other fixes: - 'show idt' on i386 and pc98 now actually checks the quit flag and terminates early. - 'show intr' now actually checks the quit flag and terminates early.
Notes
Notes: svn path=/head/; revision=160312
Diffstat (limited to 'sys/dev/pci/pci.c')
-rw-r--r--sys/dev/pci/pci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 554e6f26f300..674a66101a4f 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1716,7 +1716,7 @@ DB_SHOW_COMMAND(pciregs, db_pci_dump)
struct devlist *devlist_head;
struct pci_conf *p;
const char *name;
- int i, error, none_count, quit;
+ int i, error, none_count;
none_count = 0;
/* get the head of the device queue */
@@ -1725,10 +1725,9 @@ DB_SHOW_COMMAND(pciregs, db_pci_dump)
/*
* Go through the list of devices and print out devices
*/
- db_setup_paging(db_simple_pager, &quit, db_lines_per_page);
- for (error = 0, i = 0, quit = 0,
+ for (error = 0, i = 0,
dinfo = STAILQ_FIRST(devlist_head);
- (dinfo != NULL) && (error == 0) && (i < pci_numdevs) && !quit;
+ (dinfo != NULL) && (error == 0) && (i < pci_numdevs) && !db_pager_quit;
dinfo = STAILQ_NEXT(dinfo, pci_links), i++) {
/* Populate pd_name and pd_unit */