All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ahelenia Ziemiańska" <nabijaczleweli@nabijaczleweli.xyz>
To: linux-modules@vger.kernel.org
Subject: [PATCH kmod 1/3] Add kmod_new_flags() variant of kmod_new(), with abiver 32
Date: Tue, 5 Dec 2023 16:55:17 +0100	[thread overview]
Message-ID: <d15ca533d7f50ffd27a11fc2fdbec8aa07659b70.1701791668.git.nabijaczleweli@nabijaczleweli.xyz> (raw)

[-- Attachment #1: Type: text/plain, Size: 2421 bytes --]

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(-)

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2023-12-05 15:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 15:55 Ahelenia Ziemiańska [this message]
2023-12-05 15:55 ` [PATCH kmod 2/3] Add KMOD_NEW_IGNORE_CMDLINE Ahelenia Ziemiańska
2023-12-06 15:14   ` Lucas De Marchi
2023-12-06 20:37     ` Ahelenia Ziemiańska
2024-02-07  6:06       ` Lucas De Marchi
2023-12-05 15:55 ` [PATCH kmod 3/3] Add modprobe -I/--ignore-cmdline Ahelenia Ziemiańska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d15ca533d7f50ffd27a11fc2fdbec8aa07659b70.1701791668.git.nabijaczleweli@nabijaczleweli.xyz \
    --to=nabijaczleweli@nabijaczleweli.xyz \
    --cc=linux-modules@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.