From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v1 1/1] package/busybox: support spaces in module aliases in mdev
Date: Fri, 1 Jul 2016 23:53:57 +0200 [thread overview]
Message-ID: <20160701215357.GE17666@free.fr> (raw)
In-Reply-To: <20160701225425.57f0816b@free-electrons.com>
Andy, Thomas, All,
On 2016-07-01 22:54 +0200, Thomas Petazzoni spake thusly:
> On Fri, 1 Jul 2016 21:56:19 +0300, Andy Shevchenko wrote:
> > The new change which enabled automatic module loading on boot does not handle
> > the cases when module alias includes spaces. It prevents modules to be loaded
> > since script fails:
> >
> > % find /sys/ -name modalias | xargs sort -u
> > sort: /sys/devices/platform/Fixed: No such file or directory
> >
> > First alias in question is "platform:Fixed MDIO bus".
> >
> > Amend the script to support above like cases.
> >
> > Fixes: 07f46c2b6dae ("package/busybox: support automatic module loading with mdev")
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Thanks for this patch. However, I have one question below.
>
> > - find /sys/ -name modalias | xargs sort -u | xargs modprobe -abq
> > + find /sys -name modalias -print0 | xargs -0 sort -u | while read ma; do
>
> Why is /sys/ changed to /sys ?
>
> Is it because of the sort -u that you cannot do another xargs -0 for
> the modprobe (which would look nice that the "while read ... done"
> loop) ?
sort has a -z option to output with zero-teminated lines instead of \n.
So we could do (almost untested):
find /sys/ -name modalias -print0 |xargs -0 sort -u -z |xargs -0 modprobe -abq
Note: the -z option to sort in Busybox depends on SORT_BIG, which is
enabled in out busybox bundled configuration, so we can use it.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2016-07-01 21:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 18:56 [Buildroot] [PATCH v1 1/1] package/busybox: support spaces in module aliases in mdev Andy Shevchenko
2016-07-01 20:54 ` Thomas Petazzoni
2016-07-01 21:53 ` Yann E. MORIN [this message]
2016-07-02 11:43 ` Andy Shevchenko
2016-07-02 11:16 ` Thomas Petazzoni
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=20160701215357.GE17666@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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.