@@ -881,7 +881,8 @@ static int conf_files_list(struct kmod_ctx *ctx, struct kmod_list **list,
}
int kmod_config_new(struct kmod_ctx *ctx, struct kmod_config **p_config,
- const char * const *config_paths)
+ const char * const *config_paths,
+ enum kmod_new_flags options)
{
struct kmod_config *config;
struct kmod_list *list = NULL;
@@ -286,6 +286,12 @@ static enum kmod_file_compression_type get_kernel_compression(struct kmod_ctx *c
*/
KMOD_EXPORT struct kmod_ctx *kmod_new(const char *dirname,
const char * const *config_paths)
+{
+ return kmod_new_flags(dirname, config_paths, 0);
+}
+KMOD_EXPORT struct kmod_ctx *kmod_new_flags(const char *dirname,
+ const char * const *config_paths,
+ enum kmod_new_flags options)
{
const char *env;
struct kmod_ctx *ctx;
@@ -30,6 +30,8 @@
extern "C" {
#endif
+enum kmod_new_flags {};
+
/*
* kmod_ctx
*
@@ -38,6 +40,7 @@ extern "C" {
*/
struct kmod_ctx;
struct kmod_ctx *kmod_new(const char *dirname, const char * const *config_paths);
+struct kmod_ctx *kmod_new_flags(const char *dirname, const char * const *config_paths, enum kmod_new_flags options);
struct kmod_ctx *kmod_ref(struct kmod_ctx *ctx);
struct kmod_ctx *kmod_unref(struct kmod_ctx *ctx);
void kmod_set_log_fn(struct kmod_ctx *ctx,
@@ -92,3 +92,8 @@ LIBKMOD_22 {
global:
kmod_get_dirname;
} LIBKMOD_6;
+
+LIBKMOD_32 {
+global:
+ kmod_new_flags;
+} LIBKMOD_22;
kmod_new() is just kmod_new_flags(..., 0) Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> --- Series based on the kmod-31 tarball. libkmod/libkmod-config.c | 3 ++- libkmod/libkmod.c | 6 ++++++ libkmod/libkmod.h | 3 +++ libkmod/libkmod.sym | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-)