diff options
author | 2009-02-16 08:29:25 +0000 | |
---|---|---|
committer | 2009-02-16 08:29:25 +0000 | |
commit | be4445f732dfba6c771161ead2aa603e2624aeed (patch) | |
tree | 82e0e8f38889be037d074164dbef86f58d82b189 /sys-apps/module-init-tools/files | |
parent | old (diff) | |
download | gentoo-2-be4445f732dfba6c771161ead2aa603e2624aeed.tar.gz gentoo-2-be4445f732dfba6c771161ead2aa603e2624aeed.tar.bz2 gentoo-2-be4445f732dfba6c771161ead2aa603e2624aeed.zip |
Do not fail when /sys is not yet mounted #258442.
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/module-init-tools/files')
-rw-r--r-- | sys-apps/module-init-tools/files/module-init-tools-3.6-skip-sys-check.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/sys-apps/module-init-tools/files/module-init-tools-3.6-skip-sys-check.patch b/sys-apps/module-init-tools/files/module-init-tools-3.6-skip-sys-check.patch new file mode 100644 index 000000000000..e965e25b48ff --- /dev/null +++ b/sys-apps/module-init-tools/files/module-init-tools-3.6-skip-sys-check.patch @@ -0,0 +1,50 @@ +http://bugs.gentoo.org/258442 + +From 1a55ee5297b883ea4b43cdf74ad890873ebe966c Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Fri, 13 Feb 2009 02:21:10 -0500 +Subject: [PATCH] modprobe: remove pointless /sys requirement + +When modprobe was converted from parsing /proc to parsing /sys, it was not +a straight conversion. Instead, a "sanity" check was added early on where +modprobe would simply abort doing anything useful if /sys isn't mounted. +Unfortunately, this makes modprobe fairly unusable. Considering the +kernel itself can invoke modprobe before userspace gets a chance to start +the init process (and actually mount /sys), we end up with a chicken and +egg issue. Which gets even worse when the kernel keeps running modprobe +over and over and the boot output fills up with: +modprobe: FATAL: /sys is not mounted. +modprobe: FATAL: /sys is not mounted. +modprobe: FATAL: /sys is not mounted. +modprobe: FATAL: /sys is not mounted. +modprobe: FATAL: /sys is not mounted. +modprobe: FATAL: /sys is not mounted. + +Since modprobe itself is already written to handle the case where it +cannot figure out whether a given module is loaded (and so was able to run +perfectly fine without /proc being mounted), the check is wholly useless. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + modprobe.c | 5 ----- + 1 files changed, 0 insertions(+), 5 deletions(-) + +diff --git a/modprobe.c b/modprobe.c +index 022004c..110204b 100644 +--- a/modprobe.c ++++ b/modprobe.c +@@ -1522,11 +1522,6 @@ static void handle_module(const char *modname, + const char *cmdline_opts, + int flags) + { +- struct stat finfo; +- +- if (stat("/sys/module", &finfo) < 0) +- fatal("/sys is not mounted.\n"); +- + if (list_empty(todo_list)) { + const char *command; + +-- +1.6.1.3 + |