]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: (script) support shortcuts in the type= field
authorKarel Zak <kzak@redhat.com>
Thu, 8 Aug 2019 08:34:27 +0000 (10:34 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 8 Aug 2019 08:34:27 +0000 (10:34 +0200)
commit08474fde6669d89f5b77653ba9d378fc16e19903
tree3a3e89150cd8ab1f9653aa2f6330195c280f6511
parent11aaedf5742771b1989add0c3801bbaede6bf3b4
libfdisk: (script) support shortcuts in the type= field

The unnamed-field format supports partition type shortcuts:

",1MiB,L'

but for named-field format it requires full type:

 (mbr) "size=1MiB,type=83"
 (gpt)  "size=1MiB,type=0FC63DAF-8483-4772-8E79-3D69D8477DE4"

This patch implements type shortcuts also for named-field format:

"size=1MiB,type=L"

to make it more user-friendly and unified.

Addresses: https://github.com/karelzak/util-linux/issues/837
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/sfdisk.8
libfdisk/src/script.c