From: Harald Hoyer <harald.hoyer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: John Reiser <jreiser-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: build initramfs: unclear _mpargs in instmods()
Date: Tue, 30 Aug 2011 12:19:22 +0200 [thread overview]
Message-ID: <4E5CB92A.4060700@gmail.com> (raw)
In-Reply-To: <4E5C07B7.4050907-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>
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!
prev parent reply other threads:[~2011-08-30 10:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E5CB92A.4060700@gmail.com \
--to=harald.hoyer-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jreiser-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.