diff options
Diffstat (limited to 'disk-utils/fdisk.c')
-rw-r--r-- | disk-utils/fdisk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c index 7e8285fe9..1bf5b8290 100644 --- a/disk-utils/fdisk.c +++ b/disk-utils/fdisk.c @@ -37,6 +37,7 @@ #include "canonicalize.h" #include "strutils.h" #include "closestream.h" +#include "pager.h" #include "fdisk.h" @@ -447,6 +448,7 @@ static struct fdisk_parttype *ask_partition_type(struct fdisk_context *cxt) return NULL; } + void list_partition_types(struct fdisk_context *cxt) { size_t ntypes = 0; @@ -507,12 +509,16 @@ void list_partition_types(struct fdisk_context *cxt) */ 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'); } |