]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: fix gtk-doc comments and declarations
authorKarel Zak <kzak@redhat.com>
Tue, 14 Jul 2026 11:56:27 +0000 (13:56 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Jul 2026 12:03:02 +0000 (14:03 +0200)
- 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 <kzak@redhat.com>
libmount/src/fs.c
libmount/src/fs_statmount.c
libmount/src/libmount.h.in
libmount/src/monitor_mountinfo.c
libmount/src/mountP.h
libmount/src/tab_listmount.c
libmount/src/tab_parse.c

index 8da98cc849e663e575426eed3c0d7024cbe38cd0..81e8fbebc9f6be5d1d1b15f61a97020c14913aa4 100644 (file)
@@ -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.
  */
index 4fe4688ab85ed13483e5a33d373a98f8be618835..bf78f201d48f39219f965a12b4a1b96d9456c581 100644 (file)
@@ -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).
index ca9a1ad231909aed7cd2c8c5fa0a15e783186455..67ab0aecf31d977853682a684be5f1825832d85d 100644 (file)
@@ -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));
index 5e8b18b6a9347cca74b348a80d9b92a5476f80d4..5150bfc64b87a6bc73898d5b2f4807a6c513dc9c 100644 (file)
@@ -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)
 {
index 0f6ee4f6df7285d911231b866fb2722da0c4b3a3..674ba4f3feb305d87f1fc010a4d0f90c9d5f1a58 100644 (file)
@@ -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);
index e2c7508fe16dacfcfea75ed85de4cfa4d58e1584..6fb6c9709b1463c5627fe3bab68a047038eb71ff 100644 (file)
@@ -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
index ddbdebf1caaaaace2363f093a2737953c055b0ed..cf9bff311325b8d040f1893e14eb2feae7c49db2 100644 (file)
@@ -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)
 {