Sebastian Schmidt <yath@yath.de> (2017-03-09):
> It’s in disk-utils/fdisk.c in void list_partition_types():
> | } else {
> | /*
> | * Prints 1 column in format <idx> <name> <typestr>
> | */
> | size_t i;
> |
> | pager_open();
> |
> | for (i = 0; i < ntypes; i++) {
> | const struct fdisk_parttype *t = fdisk_label_get_parttype(lb, i);
> | printf("%3zu %-30s %s\n", i + 1,
> | fdisk_parttype_get_name(t),
> | fdisk_parttype_get_string(t));
> | }
> |
> | pager_close();
> | }
Oh, right, was looking at busybox instead of util-linux…
> The setup is done in lib/pager.c in void __setup_pager():
> | static void __setup_pager(void)
> | {
> | const char *pager = getenv("PAGER");
> | struct sigaction sa;
> |
> | if (!isatty(STDOUT_FILENO))
> | return;
> |
> | if (!pager)
> | pager = "less";
> | else if (!*pager || !strcmp(pager, "cat"))
> | return;
> |
> | [...]
>
> So setting $PAGER to more, cat or nothing in the shell should fix it.
I suspect it would make sense for rescue-mode to do so, but I'm not
familiar with its inner working…
KiBi.
Attachment:
signature.asc
Description: Digital signature