[kmod] Add patch to make rmmod understand built-in modules (rhbz 922187)
by Josh Boyer
commit 917c6ed9e9c7da387432c1d8116071cc2cb37ee7
Author: Josh Boyer <jwboyer(a)redhat.com>
Date: Mon Mar 18 10:31:19 2013 -0400
Add patch to make rmmod understand built-in modules (rhbz 922187)
fix-rmmod-builtin.patch | 20 ++++++++++++++++++++
kmod.spec | 8 +++++++-
2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/fix-rmmod-builtin.patch b/fix-rmmod-builtin.patch
new file mode 100644
index 0000000..25c1adb
--- /dev/null
+++ b/fix-rmmod-builtin.patch
@@ -0,0 +1,20 @@
+diff --git a/tools/rmmod.c b/tools/rmmod.c
+index 7f2c2f6..7f4431c 100644
+--- a/tools/rmmod.c
++++ b/tools/rmmod.c
+@@ -62,8 +62,14 @@ static void help(void)
+
+ static int check_module_inuse(struct kmod_module *mod) {
+ struct kmod_list *holders;
++ int state;
+
+- if (kmod_module_get_initstate(mod) == -ENOENT) {
++ state = kmod_module_get_initstate(mod);
++
++ if (state == KMOD_MODULE_BUILTIN) {
++ ERR("Module %s is builtin.\n", kmod_module_get_name(mod));
++ return -ENOENT;
++ } else if (state < 0) {
+ ERR("Module %s is not currently loaded\n",
+ kmod_module_get_name(mod));
+ return -ENOENT;
diff --git a/kmod.spec b/kmod.spec
index 86a2759..e88f8cc 100644
--- a/kmod.spec
+++ b/kmod.spec
@@ -1,6 +1,6 @@
Name: kmod
Version: 12
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Linux kernel module management utilities
Group: System Environment/Kernel
@@ -15,6 +15,8 @@ BuildRequires: zlib-devel
BuildRequires: xz-devel
BuildRequires: libxslt
+Patch0: fix-rmmod-builtin.patch
+
Provides: module-init-tools = 4.0-1
Obsoletes: module-init-tools < 4.0-1
Provides: /sbin/modprobe
@@ -45,6 +47,7 @@ applications that wish to load or unload Linux kernel modules.
%prep
%setup -q
+%patch0 -p1
%build
export V=1
@@ -101,6 +104,9 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d
%{_libdir}/libkmod.so
%changelog
+* Mon Mar 18 2013 Josh Boyer <jwboyer(a)redhat.com>
+- Add patch to make rmmod understand built-in modules (rhbz 922187)
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
11 years, 1 month
[kmod/f19] Add patch to make rmmod understand built-in modules (rhbz 922187)
by Josh Boyer
commit d4a52845f350e184d85b373f1ebb84181656c5a1
Author: Josh Boyer <jwboyer(a)redhat.com>
Date: Mon Mar 18 10:31:19 2013 -0400
Add patch to make rmmod understand built-in modules (rhbz 922187)
fix-rmmod-builtin.patch | 20 ++++++++++++++++++++
kmod.spec | 8 +++++++-
2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/fix-rmmod-builtin.patch b/fix-rmmod-builtin.patch
new file mode 100644
index 0000000..25c1adb
--- /dev/null
+++ b/fix-rmmod-builtin.patch
@@ -0,0 +1,20 @@
+diff --git a/tools/rmmod.c b/tools/rmmod.c
+index 7f2c2f6..7f4431c 100644
+--- a/tools/rmmod.c
++++ b/tools/rmmod.c
+@@ -62,8 +62,14 @@ static void help(void)
+
+ static int check_module_inuse(struct kmod_module *mod) {
+ struct kmod_list *holders;
++ int state;
+
+- if (kmod_module_get_initstate(mod) == -ENOENT) {
++ state = kmod_module_get_initstate(mod);
++
++ if (state == KMOD_MODULE_BUILTIN) {
++ ERR("Module %s is builtin.\n", kmod_module_get_name(mod));
++ return -ENOENT;
++ } else if (state < 0) {
+ ERR("Module %s is not currently loaded\n",
+ kmod_module_get_name(mod));
+ return -ENOENT;
diff --git a/kmod.spec b/kmod.spec
index 86a2759..e88f8cc 100644
--- a/kmod.spec
+++ b/kmod.spec
@@ -1,6 +1,6 @@
Name: kmod
Version: 12
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Linux kernel module management utilities
Group: System Environment/Kernel
@@ -15,6 +15,8 @@ BuildRequires: zlib-devel
BuildRequires: xz-devel
BuildRequires: libxslt
+Patch0: fix-rmmod-builtin.patch
+
Provides: module-init-tools = 4.0-1
Obsoletes: module-init-tools < 4.0-1
Provides: /sbin/modprobe
@@ -45,6 +47,7 @@ applications that wish to load or unload Linux kernel modules.
%prep
%setup -q
+%patch0 -p1
%build
export V=1
@@ -101,6 +104,9 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d
%{_libdir}/libkmod.so
%changelog
+* Mon Mar 18 2013 Josh Boyer <jwboyer(a)redhat.com>
+- Add patch to make rmmod understand built-in modules (rhbz 922187)
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
11 years, 1 month
[kmod/f18] Add patch to make rmmod understand built-in modules (rhbz 922187)
by Josh Boyer
commit 7e02116ebbab983239a14afcfd6727cf93cdee41
Author: Josh Boyer <jwboyer(a)redhat.com>
Date: Mon Mar 18 10:31:19 2013 -0400
Add patch to make rmmod understand built-in modules (rhbz 922187)
fix-rmmod-builtin.patch | 20 ++++++++++++++++++++
kmod.spec | 8 +++++++-
2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/fix-rmmod-builtin.patch b/fix-rmmod-builtin.patch
new file mode 100644
index 0000000..25c1adb
--- /dev/null
+++ b/fix-rmmod-builtin.patch
@@ -0,0 +1,20 @@
+diff --git a/tools/rmmod.c b/tools/rmmod.c
+index 7f2c2f6..7f4431c 100644
+--- a/tools/rmmod.c
++++ b/tools/rmmod.c
+@@ -62,8 +62,14 @@ static void help(void)
+
+ static int check_module_inuse(struct kmod_module *mod) {
+ struct kmod_list *holders;
++ int state;
+
+- if (kmod_module_get_initstate(mod) == -ENOENT) {
++ state = kmod_module_get_initstate(mod);
++
++ if (state == KMOD_MODULE_BUILTIN) {
++ ERR("Module %s is builtin.\n", kmod_module_get_name(mod));
++ return -ENOENT;
++ } else if (state < 0) {
+ ERR("Module %s is not currently loaded\n",
+ kmod_module_get_name(mod));
+ return -ENOENT;
diff --git a/kmod.spec b/kmod.spec
index c234961..cff2c18 100644
--- a/kmod.spec
+++ b/kmod.spec
@@ -1,6 +1,6 @@
Name: kmod
Version: 12
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Linux kernel module management utilities
Group: System Environment/Kernel
@@ -15,6 +15,8 @@ BuildRequires: zlib-devel
BuildRequires: xz-devel
BuildRequires: libxslt
+Patch0: fix-rmmod-builtin.patch
+
Provides: module-init-tools = 4.0-1
Obsoletes: module-init-tools < 4.0-1
Provides: /sbin/modprobe
@@ -45,6 +47,7 @@ applications that wish to load or unload Linux kernel modules.
%prep
%setup -q
+%patch0 -p1
%build
export V=1
@@ -101,6 +104,9 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d
%{_libdir}/libkmod.so
%changelog
+* Mon Mar 18 2013 Josh Boyer <jwboyer(a)redhat.com>
+- Add patch to make rmmod understand built-in modules (rhbz 922187)
+
* Thu Dec 06 2012 Josh Boyer <jwboyer(a)redhat.com>
- Update to version 12
11 years, 1 month
[Bug 922187] rmmod confused by built-ins
by Red Hat Bugzilla
Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=922187
Bryn M. Reeves <bmr(a)redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kmod-maint(a)lists.fedoraproj
| |ect.org, msivak(a)redhat.com
Component|kernel |kmod
Assignee|kernel-maint(a)redhat.com |kmod-maint(a)lists.fedoraproj
| |ect.org
--- Comment #3 from Bryn M. Reeves <bmr(a)redhat.com> ---
It's not, sorry - fatfingers. I typed the component and goofed it - fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
11 years, 2 months