libfdisk: (gpt) use generic 'created partition' message
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
ac1a559a67
commit
513d546289
|
@ -185,7 +185,7 @@ void change_partition_type(struct fdisk_context *cxt)
|
|||
t ? t->name : _("Unknown"));
|
||||
} else {
|
||||
fdisk_info(cxt,
|
||||
_("Type of partition %zu is unchanged: %s".),
|
||||
_("Type of partition %zu is unchanged: %s."),
|
||||
i + 1,
|
||||
org_t ? org_t->name : _("Unknown"));
|
||||
}
|
||||
|
|
|
@ -651,7 +651,7 @@ int fdisk_info_new_partition(
|
|||
(uint64_t)(stop - start + 1) * cxt->sector_size);
|
||||
|
||||
rc = fdisk_sinfo(cxt, FDISK_INFO_SUCCESS,
|
||||
_("Partition %d of type %s and of size %s is set."),
|
||||
_("Created a new partition %d of type '%s' and of size %s."),
|
||||
num, t ? t->name : _("Unknown"), str);
|
||||
free(str);
|
||||
return rc;
|
||||
|
|
|
@ -237,6 +237,7 @@ struct fdisk_gpt_label {
|
|||
};
|
||||
|
||||
static void gpt_deinit(struct fdisk_label *lb);
|
||||
static struct fdisk_parttype *gpt_get_partition_type(struct fdisk_context *cxt, size_t i);
|
||||
|
||||
static inline struct fdisk_gpt_label *self_label(struct fdisk_context *cxt)
|
||||
{
|
||||
|
@ -1684,9 +1685,11 @@ static int gpt_add_partition(
|
|||
user_f, user_l, &typeid, ents) != 0)
|
||||
fdisk_warnx(cxt, _("Could not create partition %zd"), partnum + 1);
|
||||
else {
|
||||
fdisk_info(cxt, _("Created partition %zd\n"), partnum + 1);
|
||||
cxt->label->nparts_cur++;
|
||||
fdisk_label_set_changed(cxt->label, 1);
|
||||
fdisk_info_new_partition(cxt, partnum + 1,
|
||||
user_f, user_l,
|
||||
gpt_get_partition_type(cxt, partnum));
|
||||
}
|
||||
|
||||
rc = 0;
|
||||
|
|
Loading…
Reference in New Issue