The list of the partition types is too long. Let's try to use $PAGER.
Reported-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
#include "canonicalize.h"
#include "strutils.h"
#include "closestream.h"
+#include "pager.h"
#include "fdisk.h"
return NULL;
}
+
void list_partition_types(struct fdisk_context *cxt)
{
size_t ntypes = 0;
*/
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();
}
putchar('\n');
}