diff --git a/disk-utils/sfdisk.8 b/disk-utils/sfdisk.8 index 0c1453e8d..6e92bf8f5 100644 --- a/disk-utils/sfdisk.8 +++ b/disk-utils/sfdisk.8 @@ -467,6 +467,10 @@ as a shortcut as a first possibility in partitioning scripts although on other p Since v2.36 libfdisk supports partition type aliases as extension to shortcuts. The alias is a simple human readable word (e.g. "linux"). +Since v2.37 libfdisk supports partition type names on input, ignoring the case +of the characters and all non-alphanumeric and non-digit characters in the name +(e.g. "Linux /usr x86" is the same as "linux usr-x86"). + Supported shortcuts and aliases: .TP .B L - alias 'linux' @@ -550,7 +554,8 @@ GPT partition name. .TP .BI type= code A hexadecimal number (without 0x) for an MBR partition, a GUID for a GPT partition, -or a shortcut as for unnamed-fields format. +a shortcut as for unnamed-fields format or a type name (e.g. type="Linux /usr (x86)"). +See above the section about the unnamed-fields format for more details. For backward compatibility the \fBId=\fR field has the same meaning. .SH EMPTY DISK LABEL .B sfdisk diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index 963cc745c..193dcebfc 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -1165,6 +1165,7 @@ static int command_parttype(struct sfdisk *sf, int argc, char **argv) type = fdisk_label_advparse_parttype(lb, typestr, FDISK_PARTTYPE_PARSE_DATA | FDISK_PARTTYPE_PARSE_ALIAS + | FDISK_PARTTYPE_PARSE_NAME | FDISK_PARTTYPE_PARSE_SHORTCUT); if (!type) errx(EXIT_FAILURE, _("failed to parse %s partition type '%s'"),