* [Buildroot] [PATCH v2 1/1] package/busybox: support spaces in module aliases in mdev
@ 2016-07-02 12:22 Andy Shevchenko
2016-07-02 13:03 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2016-07-02 12:22 UTC (permalink / raw)
To: buildroot
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.
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.
Suggested-by: Yann E. MORIN <yann.morin.1998@free.fr>
Fixes: 07f46c2b6dae ("package/busybox: support automatic module loading with mdev")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
In v2:
- address Yann's and Thomas comments
package/busybox/S10mdev | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/busybox/S10mdev b/package/busybox/S10mdev
index 4cb31de..63ca955 100644
--- a/package/busybox/S10mdev
+++ b/package/busybox/S10mdev
@@ -9,7 +9,7 @@ case "$1" in
echo /sbin/mdev >/proc/sys/kernel/hotplug
/sbin/mdev -s
# coldplug modules
- find /sys/ -name modalias | xargs sort -u | xargs modprobe -abq
+ find /sys/ -name modalias -print0 | xargs -0 sort -u -z | xargs -0 modprobe -abq
;;
stop)
;;
--
2.8.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Buildroot] [PATCH v2 1/1] package/busybox: support spaces in module aliases in mdev
2016-07-02 12:22 [Buildroot] [PATCH v2 1/1] package/busybox: support spaces in module aliases in mdev Andy Shevchenko
@ 2016-07-02 13:03 ` Thomas Petazzoni
2016-07-02 13:15 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2016-07-02 13:03 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, 2 Jul 2016 15:22:20 +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.
>
> 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.
>
> Suggested-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Fixes: 07f46c2b6dae ("package/busybox: support automatic module loading with mdev")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks for this new version, but in the mean time, I had already
modified and applied your first version.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread* [Buildroot] [PATCH v2 1/1] package/busybox: support spaces in module aliases in mdev
2016-07-02 13:03 ` Thomas Petazzoni
@ 2016-07-02 13:15 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2016-07-02 13:15 UTC (permalink / raw)
To: buildroot
On Sat, 2016-07-02 at 15:03 +0200, Thomas Petazzoni wrote:
> Hello,
>
> On Sat,??2 Jul 2016 15:22:20 +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.
> >
> > 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.
> >
> > Suggested-by: Yann E. MORIN <yann.morin.1998@free.fr>
> > Fixes: 07f46c2b6dae ("package/busybox: support automatic module
> > loading with mdev")
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Thanks for this new version, but in the mean time, I had already
> modified and applied your first version.
You were fast, I like it! Thanks.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-02 13:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-02 12:22 [Buildroot] [PATCH v2 1/1] package/busybox: support spaces in module aliases in mdev Andy Shevchenko
2016-07-02 13:03 ` Thomas Petazzoni
2016-07-02 13:15 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox