]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
libkmod: export new kmod_get_dirname() function
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 30 Sep 2015 18:28:24 +0000 (15:28 -0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Wed, 30 Sep 2015 18:28:24 +0000 (15:28 -0300)
Make sure it gets exported and add documentation.

libkmod/libkmod.c
libkmod/libkmod.sym

index 643fd3801bd07f6ab45e42993095197eb08318b1..69fe431aa4c80ec2ae782625c1d2c80d00b11605 100644 (file)
@@ -146,7 +146,15 @@ static void log_filep(void *data,
        vfprintf(fp, format, args);
 }
 
-const char *kmod_get_dirname(const struct kmod_ctx *ctx)
+
+/**
+ * kmod_get_dirname:
+ * @ctx: kmod library context
+ *
+ * Retrieve the absolute path used for linux modules in this context. The path
+ * is computed from the arguments to kmod_new().
+ */
+KMOD_EXPORT const char *kmod_get_dirname(const struct kmod_ctx *ctx)
 {
        return ctx->dirname;
 }
index 854d257d2a01544cc8acdd1c5118bbe37e07a32e..5f5e1fbac2507c24e97cc79a3436647e366855d5 100644 (file)
@@ -86,3 +86,8 @@ LIBKMOD_6 {
 global:
        kmod_module_apply_filter;
 } LIBKMOD_5;
+
+LIBKMOD_22 {
+global:
+       kmod_get_dirname;
+} LIBKMOD_6;