Mainly this appends a colon for the prompt, reverses order of the list, reports the number of primary partitions used and unused. Old version: Command action e extended p primary partition (1-4) p New version: Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select: p Old version: Command action l logical (5 or over) p primary partition (1-4) l New version: Partition type: p primary (0 primary, 1 extended, 3 free) l logical (numbered from 5) Select: l Signed-off-by: Francesco Cosoleto <cosoleto@xxxxxxxxx> --- fdisk/fdisk.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index 4a37b3b..9356356 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -2534,9 +2534,13 @@ new_partition(void) { } else { char c, line[LINE_LENGTH]; snprintf(line, sizeof(line), - _("Command action\n %s\n p primary " - "partition (1-4)\n"), extended_offset ? - _("l logical (5 or over)") : _("e extended")); + _("Partition type:\n" + " p primary (%d primary, %d extended, %d free)\n" + "%s\n" + "Select: "), + 4 - (extended_offset ? 1 : 0) - free_primary, extended_offset ? 1 : 0, free_primary, + extended_offset ? _(" l logical (numbered from 5)") : _(" e extended")); + while (1) { if ((c = tolower(read_char(line))) == 'p') { int i = get_nonexisting_partition(0, 4); -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html