summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <peter@korsgaard.com>2018-05-07 18:35:01 (GMT)
committerPeter Korsgaard <peter@korsgaard.com>2018-05-24 20:59:29 (GMT)
commita43f5f19397f89209d77aebeaa2d5bec671412a5 (patch)
tree680e410076019ab099e0955b9fd28c8c6c5bf81d
parent32cd792bde67aca63f4840cddecc85548ba62dc4 (diff)
downloadbuildroot-a43f5f19397f89209d77aebeaa2d5bec671412a5.tar.gz
buildroot-a43f5f19397f89209d77aebeaa2d5bec671412a5.tar.bz2
busybox: S10mdev: 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> (cherry picked from commit 61717b7b3ef9c6c39f4adcbbb5dced3096f0ed08) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/busybox/S10mdev3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/busybox/S10mdev b/package/busybox/S10mdev
index 63ca955..7075b77 100644
--- a/package/busybox/S10mdev
+++ b/package/busybox/S10mdev
@@ -9,7 +9,8 @@ case "$1" in
echo /sbin/mdev >/proc/sys/kernel/hotplug
/sbin/mdev -s
# coldplug modules
- find /sys/ -name modalias -print0 | xargs -0 sort -u -z | xargs -0 modprobe -abq
+ find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n' '\0' | \
+ xargs -0 modprobe -abq
;;
stop)
;;