]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
busybox: S01mdev: fix module autoloading
authorPeter Korsgaard <peter@korsgaard.com>
Mon, 7 May 2018 18:35:01 +0000 (20:35 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 8 May 2018 13:01:34 +0000 (15:01 +0200)
commit61717b7b3ef9c6c39f4adcbbb5dced3096f0ed08
tree09c6593d56221fbe2ed6a22d249fa21a8eaf3c60
parent56adbe89105d2d6bb00149d4047dae0f164a8938
busybox: S01mdev: fix module autoloading

Commit b4fc5a180c (package/busybox: support spaces in module aliases in
mdev) changed the mdev coldplugging to handle sysfs path elements and
modalias values containing spaces.  This unfortunately doesn't work as was
recently reported:

http://lists.busybox.net/pipermail/buildroot/2018-May/220903.html

The problem is that sort -z also expects the fields of the input files to be
zero terminated, which is not the case for modalias sysfs entries.

So drop the -z option to sort.  Spaces in modalias entries could be handled
with the xargs -d '\n' option, but that is unfortunately not supported by
the busybox applet.  Instead, use tr to convert newlines to zeros so we can
use xargs -0.

Reported-by: Daniel Palmer <daniel@0x0f.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/busybox/S10mdev