diff options
author | Karel Zak <kzak@redhat.com> | 2016-09-27 12:52:47 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2016-09-27 12:52:47 +0200 |
commit | 81b176c4da088c483c2cd4dea6f2e3e34a37f2be (patch) | |
tree | b3725945e43a9bd540cf2d729967c505cb387299 | |
parent | be163aa0da2a7dc0472947554ecd4d3690086de8 (diff) | |
download | util-linux-81b176c4da088c483c2cd4dea6f2e3e34a37f2be.tar.gz |
docs: some random fixes
Signed-off-by: Karel Zak <kzak@redhat.com>
-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 | ||||
-rw-r--r-- | libmount/docs/libmount-docs.xml | 4 | ||||
-rw-r--r-- | libmount/docs/libmount-sections.txt | 1 | ||||
-rw-r--r-- | libmount/src/fs.c | 1 | ||||
-rw-r--r-- | libmount/src/libmount.h.in | 4 | ||||
-rw-r--r-- | libsmartcols/docs/libsmartcols-sections.txt | 14 | ||||
-rw-r--r-- | libsmartcols/src/column.c | 8 | ||||
-rw-r--r-- | libsmartcols/src/libsmartcols.h.in | 2 |
10 files changed, 43 insertions, 33 deletions
diff --git a/libfdisk/docs/libfdisk-docs.xml b/libfdisk/docs/libfdisk-docs.xml index d1cb963240..dce7516c6f 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 e665dc10dc..8377192580 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 c629b7871a..7809b5e032 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) { diff --git a/libmount/docs/libmount-docs.xml b/libmount/docs/libmount-docs.xml index e7ae0bcc4c..04a055f486 100644 --- a/libmount/docs/libmount-docs.xml +++ b/libmount/docs/libmount-docs.xml @@ -63,4 +63,8 @@ available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. <title>API Index</title> <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include> </index> + <index role="2.28"> + <title>Index of new symbols in 2.28</title> + <xi:include href="xml/api-index-2.28.xml"><xi:fallback /></xi:include> + </index> </book> diff --git a/libmount/docs/libmount-sections.txt b/libmount/docs/libmount-sections.txt index 8f12c2d114..e1607ea54d 100644 --- a/libmount/docs/libmount-sections.txt +++ b/libmount/docs/libmount-sections.txt @@ -104,6 +104,7 @@ MNT_ERR_MOUNTOPT MNT_ERR_NOFSTAB MNT_ERR_NOFSTYPE MNT_ERR_NOSOURCE +MNT_ERR_LOOPOVERLAP </SECTION> <SECTION> diff --git a/libmount/src/fs.c b/libmount/src/fs.c index f8f63d4cf6..d143eb5fa1 100644 --- a/libmount/src/fs.c +++ b/libmount/src/fs.c @@ -1131,6 +1131,7 @@ int mnt_fs_get_priority(struct libmnt_fs *fs) /** * mnt_fs_set_priority: * @fs: /proc/swaps entry + * @prio: priority * * Returns: 0 or -1 in case of error */ diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in index 83f05efd25..86ff150c1a 100644 --- a/libmount/src/libmount.h.in +++ b/libmount/src/libmount.h.in @@ -345,7 +345,7 @@ extern const char *mnt_fs_get_srcpath(struct libmnt_fs *fs); extern int mnt_fs_get_tag(struct libmnt_fs *fs, const char **name, const char **value); extern const char *mnt_fs_get_target(struct libmnt_fs *fs); -extern int mnt_fs_set_target(struct libmnt_fs *fs, const char *target); +extern int mnt_fs_set_target(struct libmnt_fs *fs, const char *tgt); extern const char *mnt_fs_get_fstype(struct libmnt_fs *fs); extern int mnt_fs_set_fstype(struct libmnt_fs *fs, const char *fstype); @@ -385,7 +385,7 @@ extern int mnt_fs_set_freq(struct libmnt_fs *fs, int freq); extern int mnt_fs_get_passno(struct libmnt_fs *fs); extern int mnt_fs_set_passno(struct libmnt_fs *fs, int passno); extern const char *mnt_fs_get_root(struct libmnt_fs *fs); -extern int mnt_fs_set_root(struct libmnt_fs *fs, const char *root); +extern int mnt_fs_set_root(struct libmnt_fs *fs, const char *path); extern const char *mnt_fs_get_bindsrc(struct libmnt_fs *fs); extern int mnt_fs_set_bindsrc(struct libmnt_fs *fs, const char *src); extern int mnt_fs_get_id(struct libmnt_fs *fs); diff --git a/libsmartcols/docs/libsmartcols-sections.txt b/libsmartcols/docs/libsmartcols-sections.txt index f05d45479e..0c6d23d469 100644 --- a/libsmartcols/docs/libsmartcols-sections.txt +++ b/libsmartcols/docs/libsmartcols-sections.txt @@ -21,10 +21,10 @@ libscols_column scols_column_get_color scols_column_get_flags scols_column_get_header -scols_column_get_safechars; -scols_column_get_table; +scols_column_get_safechars +scols_column_get_table scols_column_get_whint -scols_column_is_customwrap; +scols_column_is_customwrap scols_column_is_hidden scols_column_is_noextremes scols_column_is_right @@ -35,15 +35,15 @@ scols_column_is_wrap scols_column_set_cmpfunc scols_column_set_color scols_column_set_flags -scols_column_set_safechars; +scols_column_set_safechars scols_column_set_whint -scols_column_set_wrapfunc; +scols_column_set_wrapfunc scols_copy_column scols_new_column scols_ref_column scols_unref_column -scols_wrapnl_chunksize; -scols_wrapnl_nextchunk; +scols_wrapnl_chunksize +scols_wrapnl_nextchunk </SECTION> <SECTION> diff --git a/libsmartcols/src/column.c b/libsmartcols/src/column.c index bfcda05c74..2dee2c02a2 100644 --- a/libsmartcols/src/column.c +++ b/libsmartcols/src/column.c @@ -244,7 +244,7 @@ const char *scols_column_get_color(const struct libscols_column *cl) * scols_wrapnl_nextchunk: * @cl: a pointer to a struct libscols_column instance * @data: string - * @userdata: any data or NULL + * @userdata: callback private data * * This is build-in function for scols_column_set_wrapfunc(). This function * terminates the current chunk by \0 and returns pointer to the begin of @@ -273,6 +273,7 @@ char *scols_wrapnl_nextchunk(const struct libscols_column *cl __attribute__((unu * scols_wrapnl_chunksize: * @cl: a pointer to a struct libscols_column instance * @data: string + * @userdata: callback private data * * Analyzes @data and returns size of the largest chunk. The chunks are based * on \n. For example for data "AAA\nBBB\nCCCC" the largest chunk size is 4. @@ -335,6 +336,7 @@ int scols_column_set_cmpfunc(struct libscols_column *cl, * @cl: a pointer to a struct libscols_column instance * @wrap_chunksize: function to return size of the largest chink of data * @wrap_nextchunk: function to return next zero terminated data + * @userdata: optional stuff for callbacks * * Extends SCOLS_FL_WRAP and allows to set custom wrap function. The default * is to wrap by column size, but you can create functions to wrap for example @@ -351,14 +353,14 @@ int scols_column_set_wrapfunc(struct libscols_column *cl, char * (*wrap_nextchunk)(const struct libscols_column *, char *, void *), - void *data) + void *userdata) { if (!cl) return -EINVAL; cl->wrap_nextchunk = wrap_nextchunk; cl->wrap_chunksize = wrap_chunksize; - cl->wrapfunc_data = data; + cl->wrapfunc_data = userdata; return 0; } diff --git a/libsmartcols/src/libsmartcols.h.in b/libsmartcols/src/libsmartcols.h.in index de45892f22..94b1aada2d 100644 --- a/libsmartcols/src/libsmartcols.h.in +++ b/libsmartcols/src/libsmartcols.h.in @@ -173,7 +173,7 @@ extern int scols_column_set_wrapfunc(struct libscols_column *cl, const char *, void *), char * (*wrap_nextchunk)(const struct libscols_column *, char *, void *), - void *data); + void *userdata); extern char *scols_wrapnl_nextchunk(const struct libscols_column *cl, char *data, void *userdata); extern size_t scols_wrapnl_chunksize(const struct libscols_column *cl, const char *data, void *userdata); |