]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: export mnt_guess_system_root() by API
authorKarel Zak <kzak@redhat.com>
Mon, 10 Dec 2018 10:39:08 +0000 (11:39 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 10 Dec 2018 10:39:08 +0000 (11:39 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/docs/libmount-sections.txt
libmount/src/libmount.h.in
libmount/src/libmount.sym
libmount/src/mountP.h
libmount/src/utils.c

index 811726bb298cb481b8b02efbd45530d5075975ed..a046fb38752bfdb0a7a59cdaa6b46a856f122764 100644 (file)
@@ -398,6 +398,7 @@ mnt_get_fstab_path
 mnt_get_mountpoint
 mnt_get_mtab_path
 mnt_get_swaps_path
+mnt_guess_system_root
 mnt_has_regular_mtab
 mnt_mangle
 mnt_match_fstype
index 63ba3225f61ea7df7d67f6bcd65e489f7fe44834..1ce9995ecd677b5a991f9a699abd87cdfa2de5e7 100644 (file)
@@ -326,6 +326,8 @@ extern const char *mnt_get_mtab_path(void);
 extern int mnt_has_regular_mtab(const char **mtab, int *writable);
 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)
+                       __ul_attribute__((nonnull(3)));
 
 /* cache.c */
 extern struct libmnt_cache *mnt_new_cache(void)
index ad7bd4786b107c39cbf5b13a929b43e9fa97787c..5145c876dd156bc1ddb3aeb0f2872c577a1e1679 100644 (file)
@@ -341,3 +341,7 @@ MOUNT_2.33 {
        mnt_context_switch_origin_ns;
        mnt_context_switch_target_ns;
 } MOUNT_2.30;
+
+MOUNT_2.34 {
+       mnt_guess_system_root;
+} MOUNT_2.33;
index 8f4fba7af70f7df359e235c31999705561ced54e..795ea69dc4a8be95c0ea17ea7b52b3fef51c5d0d 100644 (file)
@@ -120,7 +120,6 @@ extern int mnt_get_filesystems(char ***filesystems, const char *pattern);
 extern void mnt_free_filesystems(char **filesystems);
 
 extern char *mnt_get_kernel_cmdline_option(const char *name);
-extern int mnt_guess_system_root(dev_t devno, struct libmnt_cache *cache, char **path);
 extern int mnt_stat_mountpoint(const char *target, struct stat *st);
 
 /* tab.c */
index 034d3436f8a00f0ebd25abb4c4e4def8a4d6595c..4f4d10bf923f4d9f8b449a411502255f9721d70b 100644 (file)
@@ -1037,7 +1037,12 @@ char *mnt_get_kernel_cmdline_option(const char *name)
        return res;
 }
 
-/*
+/**
+ * mnt_guess_system_root:
+ * @devno: device number or zero
+ * @cache: paths cache or NULL
+ * @path: returns allocated path
+ *
  * Converts @devno to the real device name if devno major number is greater
  * than zero, otherwise use root= kernel cmdline option to get device name.
  *