Add patch to make rmmod understand built-in modules (rhbz 922187)
This commit is contained in:
parent
2e841f50ae
commit
917c6ed9e9
20
fix-rmmod-builtin.patch
Normal file
20
fix-rmmod-builtin.patch
Normal file
@ -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;
|
@ -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@redhat.com>
|
||||
- Add patch to make rmmod understand built-in modules (rhbz 922187)
|
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 12-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user