]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: add partition type aliases and shortcuts
authorKarel Zak <kzak@redhat.com>
Tue, 3 Mar 2020 14:59:49 +0000 (15:59 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Mar 2020 14:59:49 +0000 (15:59 +0100)
commitf94e753b35cf7a8bdd3a27edb72e094917757334
tree7514cd42c9d3ca4adc131dae4317fbf0bbc87192
parent91b636b5654576d0b808d0030ca9d773099e1db9
libfdisk: add partition type aliases and shortcuts

Now, the type shortcuts are supported for sfdisk scripts only.

Unfortunately, the current implementation is not generic enough
and it's also fragile as 'E' shortcut is in collision with 0x0E
type for MBR. The another issue is 'L' which makes shortcuts useless
for fdisk where 'L' is used for another purpose in dialogs.

This patch introduces partition type aliases as extension to
shortcuts. The definition of the shortcut is part of the label
definition and it's not more hardcoded in sfdisk script code.

This patch also introduces 'Ex' shortcut as replacement for (now
deprecated) 'E'.

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c
libfdisk/src/fdiskP.h
libfdisk/src/gpt.c
libfdisk/src/libfdisk.h.in
libfdisk/src/libfdisk.sym
libfdisk/src/parttype.c
libfdisk/src/script.c