From f7f28510244e22c3676cea40f55dbed6338005f3 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 30 Sep 2015 15:28:24 -0300 Subject: [PATCH] libkmod: export new kmod_get_dirname() function Make sure it gets exported and add documentation. --- libkmod/libkmod.c | 10 +++++++++- libkmod/libkmod.sym | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c index 643fd380..69fe431a 100644 --- a/libkmod/libkmod.c +++ b/libkmod/libkmod.c @@ -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; } diff --git a/libkmod/libkmod.sym b/libkmod/libkmod.sym index 854d257d..5f5e1fba 100644 --- a/libkmod/libkmod.sym +++ b/libkmod/libkmod.sym @@ -86,3 +86,8 @@ LIBKMOD_6 { global: kmod_module_apply_filter; } LIBKMOD_5; + +LIBKMOD_22 { +global: + kmod_get_dirname; +} LIBKMOD_6; -- 2.47.3