Merge pull request #96153 from xaverdh/kmod-name-field-patch-for-staging
kmod: add patch to correct behaviour with --field
This commit is contained in:
commit
4f4d0ca1dd
@ -24,7 +24,7 @@ in stdenv.mkDerivation rec {
|
|||||||
"--with-modulesdirs=${modulesDirs}"
|
"--with-modulesdirs=${modulesDirs}"
|
||||||
] ++ lib.optional withStatic "--enable-static";
|
] ++ lib.optional withStatic "--enable-static";
|
||||||
|
|
||||||
patches = [ ./module-dir.patch ]
|
patches = [ ./module-dir.patch ./no-name-field.patch ]
|
||||||
++ lib.optional stdenv.isDarwin ./darwin.patch
|
++ lib.optional stdenv.isDarwin ./darwin.patch
|
||||||
++ lib.optional withStatic ./enable-static.patch;
|
++ lib.optional withStatic ./enable-static.patch;
|
||||||
|
|
||||||
|
24
pkgs/os-specific/linux/kmod/no-name-field.patch
Normal file
24
pkgs/os-specific/linux/kmod/no-name-field.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
---
|
||||||
|
tools/modinfo.c | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tools/modinfo.c b/tools/modinfo.c
|
||||||
|
index 0231bb0..7b2259e 100644
|
||||||
|
--- a/tools/modinfo.c
|
||||||
|
+++ b/tools/modinfo.c
|
||||||
|
@@ -178,7 +178,10 @@ static int modinfo_do(struct kmod_module *mod)
|
||||||
|
is_builtin = (filename == NULL);
|
||||||
|
|
||||||
|
if (is_builtin) {
|
||||||
|
- printf("%-16s%s%c", "name:", kmod_module_get_name(mod), separator);
|
||||||
|
+ if (field == NULL || field != NULL && streq(field, "name")){
|
||||||
|
+ printf("%-16s%s%c", "name:",
|
||||||
|
+ kmod_module_get_name(mod), separator);
|
||||||
|
+ }
|
||||||
|
filename = "(builtin)";
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user