From: Karel Zak Date: Tue, 14 Jul 2026 11:56:27 +0000 (+0200) Subject: libmount: fix gtk-doc comments and declarations X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d55a2dca663913c33b2139e89ae37af4324a3855;p=thirdparty%2Futil-linux.git libmount: fix gtk-doc comments and declarations - add LIBMOUNT_DISABLE_DEPRECATED guards around deprecated function declarations (mnt_optstr_apply_flags, mnt_has_regular_mtab, mnt_get_mtab_path) - move mnt_table_enable_noautofs() and mnt_table_is_noautofs() declarations from private mountP.h to public libmount.h.in, convert doc comments to gtk-doc format - fix missing colons in struct doc comments (libmnt_update, libmnt_context, libmnt_monitor, libmnt_statmnt) - fix @id -> @ns parameter name in mnt_table_listmount_set_ns() doc - fix typo mnt_table_fetch_listmont -> mnt_table_fetch_listmount - fix wrong cross-references mnt_fs_set_ns_id() -> mnt_fs_set_ns(), mnt_table_fetch_statmount() -> mnt_fs_fetch_statmount() - fix "Since: v2.42" -> "Since: 2.42" in mnt_monitor_enable_mountinfo Signed-off-by: Karel Zak --- diff --git a/libmount/src/fs.c b/libmount/src/fs.c index 8da98cc84..81e8fbebc 100644 --- a/libmount/src/fs.c +++ b/libmount/src/fs.c @@ -1938,9 +1938,9 @@ int mnt_fs_match_options(struct libmnt_fs *fs, const char *options) } /** - * mnt_fs_print_debug + * mnt_fs_print_debug: * @fs: fstab/mtab/mountinfo entry - * @file: file stream + * @file: output file stream * * Returns: 0 on success or negative number in case of error. */ diff --git a/libmount/src/fs_statmount.c b/libmount/src/fs_statmount.c index 4fe4688ab..bf78f201d 100644 --- a/libmount/src/fs_statmount.c +++ b/libmount/src/fs_statmount.c @@ -285,8 +285,8 @@ static int apply_statmount(struct libmnt_fs *fs, struct ul_statmount *sm) * still 0, then a mask is generated for all missing data in @fs. * * The default namespace is the current namespace. This default can be - * overwritten by mnt_fs_set_ns_id(). The namespace ID is also set when @fs - * has been created by mnt_table_fetch_statmount() or on-demand (see + * overwritten by mnt_fs_set_ns(). The namespace ID is also set when @fs + * has been created by mnt_fs_fetch_statmount() or on-demand (see * mnt_table_enable_listmount()). * * Returns: 0 or negative number in case of error (if @fs is NULL). diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in index ca9a1ad23..67ab0aecf 100644 --- a/libmount/src/libmount.h.in +++ b/libmount/src/libmount.h.in @@ -106,21 +106,21 @@ struct libmnt_fs; struct libmnt_table; /** - * libmnt_update + * libmnt_update: * * utab update description */ struct libmnt_update; /** - * libmnt_context + * libmnt_context: * * Mount/umount status */ struct libmnt_context; /** - * libmnt_monitor + * libmnt_monitor: * * Mount tables monitor */ @@ -141,7 +141,7 @@ struct libmnt_tabdiff; struct libmnt_ns; /** - * libmnt_statmnt + * libmnt_statmnt: * * Setting for statmount() */ @@ -368,8 +368,10 @@ extern int mnt_match_options(const char *optstr, const char *pattern) __ul_attribute__((warn_unused_result)); extern const char *mnt_get_fstab_path(void); extern const char *mnt_get_swaps_path(void); +#ifndef LIBMOUNT_DISABLE_DEPRECATED extern const char *mnt_get_mtab_path(void); extern int mnt_has_regular_mtab(const char **mtab, int *writable); +#endif extern char *mnt_get_mountpoint(const char *path) __ul_attribute__((warn_unused_result)); extern int mnt_guess_system_root(dev_t devno, struct libmnt_cache *cache, char **path) @@ -438,8 +440,10 @@ extern int mnt_optstr_get_options(const char *optstr, char **subset, extern int mnt_optstr_get_flags(const char *optstr, unsigned long *flags, const struct libmnt_optmap *map); +#ifndef LIBMOUNT_DISABLE_DEPRECATED extern int mnt_optstr_apply_flags(char **optstr, unsigned long flags, const struct libmnt_optmap *map); +#endif /* iter.c */ enum { @@ -609,6 +613,8 @@ extern int mnt_table_parse_fstab(struct libmnt_table *tb, const char *filename); extern int mnt_table_parse_swaps(struct libmnt_table *tb, const char *filename); extern int mnt_table_parse_mtab(struct libmnt_table *tb, const char *filename); extern int mnt_table_parse_utab(struct libmnt_table *tb, const char *filename); +extern int mnt_table_enable_noautofs(struct libmnt_table *tb, int ignore); +extern int mnt_table_is_noautofs(struct libmnt_table *tb); extern int mnt_table_disable_useropts(struct libmnt_table *tb, int disable); extern int mnt_table_set_parser_errcb(struct libmnt_table *tb, int (*cb)(struct libmnt_table *tb, const char *filename, int line)); diff --git a/libmount/src/monitor_mountinfo.c b/libmount/src/monitor_mountinfo.c index 5e8b18b6a..5150bfc64 100644 --- a/libmount/src/monitor_mountinfo.c +++ b/libmount/src/monitor_mountinfo.c @@ -96,7 +96,7 @@ static const struct monitor_opers mountinfo_opers = { * * Return: 0 on success and <0 on error * - * Since: v2.42 + * Since: 2.42 */ int mnt_monitor_enable_mountinfo(struct libmnt_monitor *mn, int enable) { diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h index 0f6ee4f6d..674ba4f3f 100644 --- a/libmount/src/mountP.h +++ b/libmount/src/mountP.h @@ -163,9 +163,6 @@ extern int __mnt_table_is_fs_mounted( struct libmnt_table *tb, struct libmnt_fs *fstab_fs, const char *tgt_prefix); -extern int mnt_table_enable_noautofs(struct libmnt_table *tb, int ignore); -extern int mnt_table_is_noautofs(struct libmnt_table *tb); - /* tab_listmount.c */ extern int mnt_table_next_lsmnt(struct libmnt_table *tb, int direction); extern int mnt_table_reset_listmount(struct libmnt_table *tb); diff --git a/libmount/src/tab_listmount.c b/libmount/src/tab_listmount.c index e2c7508fe..6fb6c9709 100644 --- a/libmount/src/tab_listmount.c +++ b/libmount/src/tab_listmount.c @@ -160,7 +160,7 @@ int mnt_table_listmount_set_id(struct libmnt_table *tb, uint64_t id) /** * mnt_table_listmount_set_ns: * @tb: mount table - * @id: namespace ID + * @ns: namespace ID * * Set namespace ID for listmount(). * @@ -221,7 +221,7 @@ int mnt_table_reset_listmount(struct libmnt_table *tb) * * Enable or disable on-demand listmount() to make it usable by * mnt_table_next_fs(). This function does not affect - * mnt_table_fetch_listmont(). + * mnt_table_fetch_listmount(). * * Returns: old status (1 or 0) * Since: 2.41 diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index ddbdebf1c..cf9bff311 100644 --- a/libmount/src/tab_parse.c +++ b/libmount/src/tab_parse.c @@ -1082,12 +1082,16 @@ int mnt_table_set_parser_fltrcb(struct libmnt_table *tb, return 0; } -/* +/** * mnt_table_enable_noautofs: * @tb: table * @ignore: ignore or don't ignore * * Enable/disable ignore autofs mount table entries on reading. + * + * Returns: 0 on success or negative number in case of error. + * + * Since: 2.38 */ int mnt_table_enable_noautofs(struct libmnt_table *tb, int ignore) { @@ -1097,11 +1101,13 @@ int mnt_table_enable_noautofs(struct libmnt_table *tb, int ignore) return 0; } -/* +/** * mnt_table_is_noautofs: * @tb: table * - * Return the the enabled status of ignore autofs mount table entries. + * Returns: 1 if autofs entries are ignored, 0 otherwise. + * + * Since: 2.38 */ int mnt_table_is_noautofs(struct libmnt_table *tb) {