Accepting request 867442 from home:pevik:branches:Base:System

- Backport upstream fix 0001-Fix-modinfo-F-always-shows-name-for-built-ins.patch

OBS-URL: https://build.opensuse.org/request/show/867442
OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=177
This commit is contained in:
Jan Engelhardt 2021-01-28 12:11:04 +00:00 committed by Git OBS Bridge
parent 0ad80d3c52
commit 0a94b83283
4 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,43 @@
From 45dd8d3d2859b58c203d9be16ab7ed77d98b7714 Mon Sep 17 00:00:00 2001
From: Marco d'Itri <md@linux.it>
Date: Thu, 7 Jan 2021 20:17:48 -0800
Subject: [PATCH] Fix "modinfo -F always shows name for built-ins"
Bug reported by Ben Hutchings <ben@decadent.org.uk>:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970871
Now that the kernel provides module information for potentially
modular code that's actually built-in, it's possible to query these
built-ins with "modinfo -F". However, this doesn't work quite right:
$ modinfo -Flicense e1000e
GPL v2
$ modinfo -Flicense bitrev
name: bitrev
GPL
Reviewed-by: Petr Vorel <pvorel@suse.cz>
[ Patch-mainline: fa67110f896cdef67f42cbc2206ae2a8524acee6 ]
---
tools/modinfo.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/modinfo.c b/tools/modinfo.c
index 0231bb0..f6a971f 100644
--- a/tools/modinfo.c
+++ b/tools/modinfo.c
@@ -178,7 +178,11 @@ 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)
+ printf("%-16s%s%c", "name:",
+ kmod_module_get_name(mod), separator);
+ else if (field != NULL && streq(field, "name"))
+ printf("%s%c", kmod_module_get_name(mod), separator);
filename = "(builtin)";
}
--
2.30.0

View File

@ -37,6 +37,7 @@ Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch
Patch6: 0012-modprobe-print-unsupported-status.patch Patch6: 0012-modprobe-print-unsupported-status.patch
Patch7: usr-lib-modprobe.patch Patch7: usr-lib-modprobe.patch
Patch8: no-stylesheet-download.patch Patch8: no-stylesheet-download.patch
Patch9: 0001-Fix-modinfo-F-always-shows-name-for-built-ins.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: docbook5-xsl-stylesheets BuildRequires: docbook5-xsl-stylesheets

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jan 28 11:03:09 UTC 2021 - Petr Vorel <pvorel@suse.cz>
- Backport upstream fix 0001-Fix-modinfo-F-always-shows-name-for-built-ins.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 12 16:04:41 UTC 2021 - Michal Suchanek <msuchanek@suse.de> Tue Jan 12 16:04:41 UTC 2021 - Michal Suchanek <msuchanek@suse.de>

View File

@ -37,6 +37,7 @@ Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch
Patch6: 0012-modprobe-print-unsupported-status.patch Patch6: 0012-modprobe-print-unsupported-status.patch
Patch7: usr-lib-modprobe.patch Patch7: usr-lib-modprobe.patch
Patch8: no-stylesheet-download.patch Patch8: no-stylesheet-download.patch
Patch9: 0001-Fix-modinfo-F-always-shows-name-for-built-ins.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: docbook5-xsl-stylesheets BuildRequires: docbook5-xsl-stylesheets