]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
Revert "libkmod: call fnmatch() only as needed"
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 24 Oct 2024 04:59:02 +0000 (23:59 -0500)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 24 Oct 2024 15:08:01 +0000 (10:08 -0500)
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 <lucas.de.marchi@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/208
libkmod/libkmod-index.c

index fcb63efe10f84f4b64241d627cdbd8851d1985f4..da60eda7c663a893a847a9d6d9cd1b41a83564e5 100644 (file)
@@ -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)