summaryrefslogtreecommitdiff
path: root/nonsystemd/mkinitcpio/0002-mkinitcpio-fix-builtin.patch
blob: 3ee8d1f4f9399af7aa35b09861132a8594c121b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 30dbfc2770cb49cb3babfb750205b126d7d88791 Mon Sep 17 00:00:00 2001
From: Morten Linderud <morten@linderud.pw>
Date: Thu, 20 Feb 2020 09:44:29 +0100
Subject: [PATCH] [functions] Ignore modinfo built-in modules

modinfo have started reporting filenames as "(builtin)" on built-in
modules. Ignore these and continue with other modules.

Fixes: https://bugs.archlinux.org/task/65564
Introduced in: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=e7e2cb61fa9f1db3429d91ef6accff549500d268

Signed-off-by: Morten Linderud <morten@linderud.pw>
---
 functions | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/functions b/functions
index f407c82..1c72b56 100644
--- a/functions
+++ b/functions
@@ -371,7 +371,7 @@ add_module() {
     target=${1%.ko*} target=${target//-/_}
 
     # skip expensive stuff if this module has already been added
-    (( _addedmodules["$target"] == 1 )) && return
+    (( _addedmodules["$target"] > 0 )) && return
 
     while IFS=':= ' read -r -d '' field value; do
         case "$field" in