diff options
author | Karel Zak | 2013-09-03 13:43:26 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-16 16:47:09 +0200 |
commit | 513d546289500da75d9e14a933509b7c58b1554e (patch) | |
tree | 57d482e937abd2051962ea686e76d379bfc5c4a6 | |
parent | libfdisk: use fdisk_colon() and fdisk_sinfo() (diff) | |
download | kernel-qcow2-util-linux-513d546289500da75d9e14a933509b7c58b1554e.tar.gz kernel-qcow2-util-linux-513d546289500da75d9e14a933509b7c58b1554e.tar.xz kernel-qcow2-util-linux-513d546289500da75d9e14a933509b7c58b1554e.zip |
libfdisk: (gpt) use generic 'created partition' message
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | fdisks/fdisk.c | 2 | ||||
-rw-r--r-- | libfdisk/src/ask.c | 2 | ||||
-rw-r--r-- | libfdisk/src/gpt.c | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c index d7e01faa1..0bc9fcd79 100644 --- a/fdisks/fdisk.c +++ b/fdisks/fdisk.c @@ -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")); } diff --git a/libfdisk/src/ask.c b/libfdisk/src/ask.c index 3c1ba659b..09b081974 100644 --- a/libfdisk/src/ask.c +++ b/libfdisk/src/ask.c @@ -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; diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c index 6ae0e8201..c1c3a852c 100644 --- a/libfdisk/src/gpt.c +++ b/libfdisk/src/gpt.c @@ -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; |