]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fdisk: add support for parttype aliases
authorKarel Zak <kzak@redhat.com>
Tue, 3 Mar 2020 15:10:02 +0000 (16:10 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Mar 2020 15:20:05 +0000 (16:20 +0100)
commit006607abb5c0bc40f1f94da94abb14f0668d8205
tree7d9583fdcfe4d90cd0a21c5bd02a76c41d56d18f
parent5839a4ea032b47813d4be6406e6d1ad7ee33afe1
fdisk: add support for parttype aliases

* add list of supported aliases to 'l' and 'L' output
* support aliases in 't' dialog

For example (use 'swap' to set 0x82 partition type):

 Command (m for help): t
 Selected partition 1
 Hex code or alias (type L to list all): swap
 Changed type of partition 'Linux' to 'Linux swap / Solaris'.

Note that the aliases are evaluated as the last possibility if user's
input dues not match up with any partition type. This is necessary for
backward compatibility.

This patch does NOT introduce shortcuts (.e.g. 'S' for swap) to
fdisk(8) due to collisions with already used dialog keys.

Addresses: https://github.com/karelzak/util-linux/issues/958
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/fdisk.c