* build initramfs: unclear _mpargs in instmods()
@ 2011-08-29 21:42 John Reiser
[not found] ` <4E5C07B7.4050907-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: John Reiser @ 2011-08-29 21:42 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
The local variable _mpargs in function instmods() in file dracut-functions
looks peculiar. The documentation is non-existent, but still ...
First, $_mpargs is not passed to modprobe via for_each_kmod_dep.
This is strange because my guess is that "_mpargs" means
"extra arguments for modprobe".
Second, the leading "--" will be lopped when a leading pathname
is stripped via
_mod=${_mod##*/}
It seems to me that a leading "--" should inhibit modification.
Here's the corresponding patch to current HEAD (from dracut-013.)
diff --git a/dracut-functions b/dracut-functions
index a3340e4..c28766e 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -919,7 +919,6 @@ instmods() {
fi
;;
--*)
- _mod=${_mod##*/}
_mpargs+=" $_mod";;
i2o_scsi) shift; continue;; # Do not load this diagnostic-only module
*) _mod=${_mod##*/}
@@ -942,7 +941,7 @@ instmods() {
# ok, load the module, all its dependencies, and any firmware
# it may require
for_each_kmod_dep install_kmod_with_fw $_mod \
- --set-version $kernel ${_moddirname}
+ --set-version $kernel ${_moddirname} $_mpargs
((_ret+=$?))
;;
esac
--
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <4E5C07B7.4050907-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>]
* Re: build initramfs: unclear _mpargs in instmods() [not found] ` <4E5C07B7.4050907-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org> @ 2011-08-30 10:19 ` Harald Hoyer 0 siblings, 0 replies; 2+ messages in thread From: Harald Hoyer @ 2011-08-30 10:19 UTC (permalink / raw) To: John Reiser; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA On 29.08.2011 23:42, John Reiser wrote: > The local variable _mpargs in function instmods() in file dracut-functions > looks peculiar. The documentation is non-existent, but still ... > > First, $_mpargs is not passed to modprobe via for_each_kmod_dep. > This is strange because my guess is that "_mpargs" means > "extra arguments for modprobe". > > Second, the leading "--" will be lopped when a leading pathname > is stripped via > _mod=${_mod##*/} > It seems to me that a leading "--" should inhibit modification. > > Here's the corresponding patch to current HEAD (from dracut-013.) > > diff --git a/dracut-functions b/dracut-functions > index a3340e4..c28766e 100755 > --- a/dracut-functions > +++ b/dracut-functions > @@ -919,7 +919,6 @@ instmods() { > fi > ;; > --*) > - _mod=${_mod##*/} > _mpargs+=" $_mod";; > i2o_scsi) shift; continue;; # Do not load this diagnostic-only module > *) _mod=${_mod##*/} > @@ -942,7 +941,7 @@ instmods() { > # ok, load the module, all its dependencies, and any firmware > # it may require > for_each_kmod_dep install_kmod_with_fw $_mod \ > - --set-version $kernel ${_moddirname} > + --set-version $kernel ${_moddirname} $_mpargs > ((_ret+=$?)) > ;; > esac > git blame was my friend to find out, what the original intention of $_mpargs was: modprobe $mpargs --set-version $kernel --show-depends $mod so, your patch seems to be correct! Thanks! ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-30 10:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-29 21:42 build initramfs: unclear _mpargs in instmods() John Reiser
[not found] ` <4E5C07B7.4050907-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>
2011-08-30 10:19 ` Harald Hoyer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox