diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index f9f733b48..997623125 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -715,9 +715,9 @@ static int command_parttype(struct sfdisk *sf, int argc, char **argv) if (sf->backup) backup_partition_table(sf, devname); - /* parse and apply yo PT */ + /* parse and apply to PT */ type = fdisk_label_parse_parttype(lb, typestr); - if (!type || fdisk_parttype_is_unknown(type)) + if (!type) errx(EXIT_FAILURE, _("failed to parse %s partition type '%s'"), fdisk_label_get_name(lb), typestr); diff --git a/libfdisk/src/script.c b/libfdisk/src/script.c index 684c01401..5a89790d7 100644 --- a/libfdisk/src/script.c +++ b/libfdisk/src/script.c @@ -697,7 +697,7 @@ static int parse_script_line(struct fdisk_script *dp, char *s) script_get_label(dp), type); free(type); - if (!pa->type || fdisk_parttype_is_unknown(pa->type)) { + if (!pa->type) { rc = -EINVAL; fdisk_unref_parttype(pa->type); pa->type = NULL; @@ -843,7 +843,7 @@ static int parse_commas_line(struct fdisk_script *dp, char *s) script_get_label(dp), str); free(str); - if (!pa->type || fdisk_parttype_is_unknown(pa->type)) { + if (!pa->type) { rc = -EINVAL; fdisk_unref_parttype(pa->type); pa->type = NULL;