#include "fileio.h"
#include "fs-util.h"
#include "locale-util.h"
+#include "pager.h"
#include "parse-util.h"
#include "rm-rf.h"
#include "stat-util.h"
static char *arg_path = NULL;
static bool arg_print_path = false;
static bool arg_touch_variables = true;
+static bool arg_no_pager = false;
static int acquire_esp(
bool unprivileged_mode,
" --path=PATH Path to the EFI System Partition (ESP)\n"
" -p --print-path Print path to the EFI partition\n"
" --no-variables Don't touch EFI variables\n"
+ " --no-pager Do not pipe output into a pager\n"
"\nCommands:\n"
" status Show status of installed systemd-boot and EFI variables\n"
" list List boot entries\n"
ARG_PATH = 0x100,
ARG_VERSION,
ARG_NO_VARIABLES,
+ ARG_NO_PAGER,
};
static const struct option options[] = {
{ "path", required_argument, NULL, ARG_PATH },
{ "print-path", no_argument, NULL, 'p' },
{ "no-variables", no_argument, NULL, ARG_NO_VARIABLES },
+ { "no-pager", no_argument, NULL, ARG_NO_PAGER },
{}
};
arg_touch_variables = false;
break;
+ case ARG_NO_PAGER:
+ arg_no_pager = true;
+ break;
+
case '?':
return -EINVAL;
r = 0; /* If we couldn't determine the path, then don't consider that a problem from here on, just show what we
* can show */
+ (void) pager_open(arg_no_pager, false);
+
if (is_efi_boot()) {
_cleanup_free_ char *fw_type = NULL, *fw_info = NULL, *loader = NULL, *loader_path = NULL, *stub = NULL;
sd_id128_t loader_part_uuid = SD_ID128_NULL;
else {
size_t n;
+ (void) pager_open(arg_no_pager, false);
+
printf("Boot Loader Entries:\n");
for (n = 0; n < config.n_entries; n++) {
r = bootctl_main(argc, argv);
finish:
+ pager_close();
free(arg_path);
+
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}