summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authordcs <dcs@FreeBSD.org>2001-02-22 11:22:14 +0000
committerdcs <dcs@FreeBSD.org>2001-02-22 11:22:14 +0000
commit290c615f2c0a3da32c55fb6afcf5b8168a30f9d6 (patch)
treec1e16ed37753df0c695297253b7a91d26b97462e /sys/boot
parenta1e08c4bceeab3ea235300b57bfc9903dbc17a35 (diff)
downloadFreeBSD-src-290c615f2c0a3da32c55fb6afcf5b8168a30f9d6.zip
FreeBSD-src-290c615f2c0a3da32c55fb6afcf5b8168a30f9d6.tar.gz
Whenever the user might be offered a chance to quit through
pager_output(), respect that choice. PR: 15747
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/common/commands.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/boot/common/commands.c b/sys/boot/common/commands.c
index b0fb412..34b31a2 100644
--- a/sys/boot/common/commands.c
+++ b/sys/boot/common/commands.c
@@ -409,11 +409,12 @@ command_more(int argc, char *argv[])
pager_open();
for (i = 1; (i < argc) && (res == 0); i++) {
sprintf(line, "*** FILE %s BEGIN ***\n", argv[i]);
- pager_output(line);
+ if (pager_output(line))
+ break;
res = page_file(argv[i]);
if (!res) {
sprintf(line, "*** FILE %s END ***\n", argv[i]);
- pager_output(line);
+ res = pager_output(line);
}
}
pager_close();
@@ -469,11 +470,13 @@ command_lsdev(int argc, char *argv[])
for (i = 0; devsw[i] != NULL; i++) {
if (devsw[i]->dv_print != NULL){
sprintf(line, "%s @ %p\n", devsw[i]->dv_name, devsw[i]->dv_print);
- pager_output(line);
+ if (pager_output(line))
+ break;
devsw[i]->dv_print(verbose);
} else {
sprintf(line, "%s: (unknown)\n", devsw[i]->dv_name);
- pager_output(line);
+ if (pager_output(line))
+ break;
}
}
pager_close();
OpenPOWER on IntegriCloud