From cb9a656f83a705e195a25cba9f4ca25f8c9838e0 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 23 Oct 2024 23:59:02 -0500 Subject: [PATCH] Revert "libkmod: call fnmatch() only as needed" This reverts commit e79bba6b4af86216072b56382198da645a0906f4. This broke alias resolution to more than one module. Example: kmod v33: $ modprobe -R char-major-116-1 snd snd_seq e79bba6b4af86216072b56382198da645a0906f4: $ ./modprobe -R char-major-116-1 snd Closes: https://github.com/kmod-project/kmod/issues/207 Signed-off-by: Lucas De Marchi Link: https://github.com/kmod-project/kmod/pull/208 --- libkmod/libkmod-index.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c index fcb63efe..da60eda7 100644 --- a/libkmod/libkmod-index.c +++ b/libkmod/libkmod-index.c @@ -511,7 +511,7 @@ static void index_searchwild__all(struct index_node_f *node, int j, struct strbu } } - if (pushed && node->values) { + if (node->values) { const char *s = strbuf_str(buf); if (s != NULL && fnmatch(s, subkey, 0) == 0) @@ -979,7 +979,7 @@ static void index_mm_searchwild_all(struct index_mm_node *node, int j, struct st } } - if (pushed && node->value_count > 0) { + if (node->value_count > 0) { const char *s = strbuf_str(buf); if (s != NULL && fnmatch(s, subkey, 0) == 0) -- 2.47.2