[PATCH kmod 1/3] Add kmod_new_flags() variant of kmod_new(), with abiver 32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kmod_new() is just kmod_new_flags(..., 0)

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
---
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(-)

diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
index e83621b..e24dab1 100644
--- a/libkmod/libkmod-config.c
+++ b/libkmod/libkmod-config.c
@@ -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;
diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c
index 1b8773c..279b35d 100644
--- a/libkmod/libkmod.c
+++ b/libkmod/libkmod.c
@@ -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;
diff --git a/libkmod/libkmod.h b/libkmod/libkmod.h
index 7251aa7..72cd7a2 100644
--- a/libkmod/libkmod.h
+++ b/libkmod/libkmod.h
@@ -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,
diff --git a/libkmod/libkmod.sym b/libkmod/libkmod.sym
index 0c04fda..bd602ca 100644
--- a/libkmod/libkmod.sym
+++ b/libkmod/libkmod.sym
@@ -92,3 +92,8 @@ LIBKMOD_22 {
 global:
 	kmod_get_dirname;
 } LIBKMOD_6;
+
+LIBKMOD_32 {
+global:
+	kmod_new_flags;
+} LIBKMOD_22;
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux