]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (gpt) use generic 'created partition' message
authorKarel Zak <kzak@redhat.com>
Tue, 3 Sep 2013 11:43:26 +0000 (13:43 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:47:09 +0000 (16:47 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdisk.c
libfdisk/src/ask.c
libfdisk/src/gpt.c

index d7e01faa191765bb15ad182569f194aaeec3bda8..0bc9fcd79492469ad6573d18b98a6380eeb0e6f1 100644 (file)
@@ -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"));
                }
index 3c1ba659bcee3331d884e14bd5102941e361a11d..09b081974cf2da0e7e88c53dae431039d8c1cd7f 100644 (file)
@@ -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;
index 6ae0e8201c77b4393b6064dbc1e40539f2cb5bde..c1c3a852c65632df332b927efed1482f9dcb3a52 100644 (file)
@@ -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;