Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37507335
en ru br
ALT Linux repos
S:2.38.0-alt2

Group :: System/Base
RPM: make-initrd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0003-initrd-scanmod-module-must-satisfy-all-the-rules-fro.patch
Download


From f150ca93d1dd4f0284a1e4a44125e6e2e9846dd0 Mon Sep 17 00:00:00 2001
From: Alexey Gladkov <gladkov.alexey@gmail.com>
Date: Mon, 28 Mar 2022 13:59:15 +0200
Subject: initrd-scanmod: module must satisfy all the rules from the ruleset
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
---
 utils/initrd-scanmod/initrd-scanmod-walk.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/utils/initrd-scanmod/initrd-scanmod-walk.c b/utils/initrd-scanmod/initrd-scanmod-walk.c
index 87352b718..893e9d16e 100644
--- a/utils/initrd-scanmod/initrd-scanmod-walk.c
+++ b/utils/initrd-scanmod/initrd-scanmod-walk.c
@@ -117,7 +117,7 @@ process_module_ruleset(struct kmod_ctx *ctx, const char *filename, struct rulese
 		if (rc < 0)
 			goto exit;
 		if (rc > 0) {
-			is_match = 1;
+			is_match |= RULESET_HAS_PATHS;
 
 			if (verbose > 1)
 				warnx("%s: path matches", kmod_module_get_path(mod));
@@ -139,7 +139,7 @@ process_module_ruleset(struct kmod_ctx *ctx, const char *filename, struct rulese
 			if (rc < 0)
 				goto exit;
 			if (rc > 0) {
-				is_match = 1;
+				is_match |= RULESET_HAS_INFO;
 
 				if (verbose > 1)
 					warnx("%s: the module information matches", kmod_module_get_path(mod));
@@ -167,7 +167,7 @@ process_module_ruleset(struct kmod_ctx *ctx, const char *filename, struct rulese
 			if (rc < 0)
 				goto exit;
 			if (rc > 0) {
-				is_match = 1;
+				is_match |= RULESET_HAS_SYMBOLS;
 
 				if (verbose > 1)
 					warnx("%s: symbols matches", kmod_module_get_path(mod));
@@ -193,7 +193,7 @@ process_module_ruleset(struct kmod_ctx *ctx, const char *filename, struct rulese
 			if (rc < 0)
 				goto exit;
 			if (rc > 0) {
-				is_match = 1;
+				is_match |= RULESET_HAS_SYMBOLS;
 
 				if (verbose > 1)
 					warnx("%s: symbols matches", kmod_module_get_path(mod));
@@ -208,7 +208,7 @@ process_module_ruleset(struct kmod_ctx *ctx, const char *filename, struct rulese
 			goto exit;
 		}
 	}
-	if (is_match)
+	if (set->flags == is_match)
 		printf("%s\n", kmod_module_get_path(mod));
 exit:
 	if (mod)
-- 
2.33.0
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin