diff options
author | Karel Zak | 2016-09-27 12:52:47 +0200 |
---|---|---|
committer | Karel Zak | 2016-09-27 12:52:47 +0200 |
commit | 81b176c4da088c483c2cd4dea6f2e3e34a37f2be (patch) | |
tree | b3725945e43a9bd540cf2d729967c505cb387299 /libfdisk | |
parent | libfdisk: (docs) add missing version notes (diff) | |
download | kernel-qcow2-util-linux-81b176c4da088c483c2cd4dea6f2e3e34a37f2be.tar.gz kernel-qcow2-util-linux-81b176c4da088c483c2cd4dea6f2e3e34a37f2be.tar.xz kernel-qcow2-util-linux-81b176c4da088c483c2cd4dea6f2e3e34a37f2be.zip |
docs: some random fixes
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk')
-rw-r--r-- | libfdisk/docs/libfdisk-docs.xml | 2 | ||||
-rw-r--r-- | libfdisk/src/gpt.c | 18 | ||||
-rw-r--r-- | libfdisk/src/item.c | 22 |
3 files changed, 22 insertions, 20 deletions
diff --git a/libfdisk/docs/libfdisk-docs.xml b/libfdisk/docs/libfdisk-docs.xml index d1cb96324..dce7516c6 100644 --- a/libfdisk/docs/libfdisk-docs.xml +++ b/libfdisk/docs/libfdisk-docs.xml @@ -40,6 +40,8 @@ available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. <xi:include href="xml/partition.xml"/> <xi:include href="xml/table.xml"/> <xi:include href="xml/parttype.xml"/> + <xi:include href="xml/item.xml"/> + <xi:include href="xml/field.xml"/> </part> <part> <title>Label specific functions</title> diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c index e665dc10d..837719258 100644 --- a/libfdisk/src/gpt.c +++ b/libfdisk/src/gpt.c @@ -2493,16 +2493,16 @@ static int gpt_check_table_overlap(struct fdisk_context *cxt, /** * fdisk_gpt_set_npartitions: * @cxt: context - * @new: new size + * @entries: new size * * Elarge GPT entries array if possible. The function check if an existing * partition does not overlap the entries array area. If yes, then it report * warning and returns -EINVAL. * * Returns: 0 on success, < 0 on error. - * Since: v2.29 + * Since: 2.29 */ -int fdisk_gpt_set_npartitions(struct fdisk_context *cxt, uint32_t new) +int fdisk_gpt_set_npartitions(struct fdisk_context *cxt, uint32_t entries) { struct fdisk_gpt_label *gpt; size_t old_size, new_size; @@ -2518,11 +2518,11 @@ int fdisk_gpt_set_npartitions(struct fdisk_context *cxt, uint32_t new) gpt = self_label(cxt); old = le32_to_cpu(gpt->pheader->npartition_entries); - if (old == new) + if (old == entries) return 0; /* do nothing, say nothing */ /* calculate the size (bytes) of the entries array */ - new_size = new * le32_to_cpu(gpt->pheader->sizeof_partition_entry); + new_size = entries * le32_to_cpu(gpt->pheader->sizeof_partition_entry); old_size = old * le32_to_cpu(gpt->pheader->sizeof_partition_entry); /* calculate new range of usable LBAs */ @@ -2531,7 +2531,7 @@ int fdisk_gpt_set_npartitions(struct fdisk_context *cxt, uint32_t new) /* if expanding the table, first check that everything fits, * then allocate more memory and zero. */ - if (new > old) { + if (entries > old) { rc = gpt_check_table_overlap(cxt, first_usable, last_usable); if (rc) return rc; @@ -2545,8 +2545,8 @@ int fdisk_gpt_set_npartitions(struct fdisk_context *cxt, uint32_t new) } /* everything's ok, apply the new size */ - gpt->pheader->npartition_entries = cpu_to_le32(new); - gpt->bheader->npartition_entries = cpu_to_le32(new); + gpt->pheader->npartition_entries = cpu_to_le32(entries); + gpt->bheader->npartition_entries = cpu_to_le32(entries); /* usable LBA addresses will have changed */ fdisk_set_first_lba(cxt, first_usable); @@ -2564,7 +2564,7 @@ int fdisk_gpt_set_npartitions(struct fdisk_context *cxt, uint32_t new) gpt_recompute_crc(gpt->pheader, gpt->ents); gpt_recompute_crc(gpt->bheader, gpt->ents); - fdisk_info(cxt, _("Partition table length changed from %"PRIu32" to %"PRIu64"."), old, new); + fdisk_info(cxt, _("Partition table length changed from %"PRIu32" to %"PRIu64"."), old, entries); fdisk_label_set_changed(cxt->label, 1); return 0; diff --git a/libfdisk/src/item.c b/libfdisk/src/item.c index c629b7871..7809b5e03 100644 --- a/libfdisk/src/item.c +++ b/libfdisk/src/item.c @@ -2,7 +2,7 @@ #include "fdiskP.h" /** - * SECTION: labelitem + * SECTION: item * @title: Labelitem * @short_description: disk label items * @@ -32,7 +32,7 @@ * fdisk_new_labelitem * * Returns: new instance. - * Since: v2.29 + * Since: 2.29 */ struct fdisk_labelitem *fdisk_new_labelitem(void) { @@ -48,7 +48,7 @@ struct fdisk_labelitem *fdisk_new_labelitem(void) * @li: label item * * Increments reference counter. - * Since: v2.29 + * Since: 2.29 */ void fdisk_ref_labelitem(struct fdisk_labelitem *li) { @@ -63,7 +63,7 @@ void fdisk_ref_labelitem(struct fdisk_labelitem *li) * Zeroize data stored in the @li (does not modify anything in disk label). * * Returns: 0 on success, or <0 in case of error - * Since: v2.29 + * Since: 2.29 */ int fdisk_reset_labelitem(struct fdisk_labelitem *li) { @@ -87,7 +87,7 @@ int fdisk_reset_labelitem(struct fdisk_labelitem *li) * Decrements reference counter, on zero the @li is automatically * deallocated. * - * Since: v2.29 + * Since: 2.29 */ void fdisk_unref_labelitem(struct fdisk_labelitem *li) { @@ -107,7 +107,7 @@ void fdisk_unref_labelitem(struct fdisk_labelitem *li) * @li: label item * * Returns: item name or NULL. - * Since: v2.29 + * Since: 2.29 */ const char *fdisk_labelitem_get_name(struct fdisk_labelitem *li) { @@ -119,7 +119,7 @@ const char *fdisk_labelitem_get_name(struct fdisk_labelitem *li) * @li: label item * * Returns: item Id or <0 in case of error. - * Since: v2.29 + * Since: 2.29 */ int fdisk_labelitem_get_id(struct fdisk_labelitem *li) { @@ -133,7 +133,7 @@ int fdisk_labelitem_get_id(struct fdisk_labelitem *li) * @data: returns data * * Returns: 0 on success, <0 on error - * Since: v2.29 + * Since: 2.29 */ int fdisk_labelitem_get_data_u64(struct fdisk_labelitem *li, uint64_t *data) { @@ -151,7 +151,7 @@ int fdisk_labelitem_get_data_u64(struct fdisk_labelitem *li, uint64_t *data) * @data: returns data * * Returns: 0 on success, <0 on error. - * Since: v2.29 + * Since: 2.29 */ int fdisk_labelitem_get_data_string(struct fdisk_labelitem *li, const char **data) { @@ -168,7 +168,7 @@ int fdisk_labelitem_get_data_string(struct fdisk_labelitem *li, const char **dat * @li: label item * * Returns: 0 or 1 - * Since: v2.29 + * Since: 2.29 */ int fdisk_labelitem_is_string(struct fdisk_labelitem *li) { @@ -180,7 +180,7 @@ int fdisk_labelitem_is_string(struct fdisk_labelitem *li) * @li: label item * * Returns: 0 or 1 - * Since: v2.29 + * Since: 2.29 */ int fdisk_labelitem_is_number(struct fdisk_labelitem *li) { |