Message ID | 20190619164257.183607-3-titouan.christophe@railnova.eu |
---|---|
State | Accepted |
Headers | show |
Series | Update Busybox to 1.31 and use mdev daemon mode | expand |
On Wed, Jun 19, 2019 at 06:42:56PM +0200, Titouan Christophe wrote: > Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu> > - find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n' '\0' | \ > - xargs -0 modprobe -abq > + find /sys/ -name modalias -print0 | \ > + xargs -0 sort -u | \ > + tr '\n' '\0' | \ > + xargs -0 modprobe -abq How this indentation change related to the topic?
Hello Andy, On 6/20/19 12:10 PM, Andy Shevchenko wrote: > On Wed, Jun 19, 2019 at 06:42:56PM +0200, Titouan Christophe wrote: >> Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu> > >> - find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n' '\0' | \ >> - xargs -0 modprobe -abq > >> + find /sys/ -name modalias -print0 | \ >> + xargs -0 sort -u | \ >> + tr '\n' '\0' | \ >> + xargs -0 modprobe -abq > > How this indentation change related to the topic? > This is a preparatory patch to convert this script to the canonical init script format, as suggested by Arnout (see http://lists.busybox.net/pipermail/buildroot/2019-May/251199.html) Regards, Titouan
Hi again, On 6/20/19 12:44 PM, Titouan Christophe wrote: > Hello Andy, > > On 6/20/19 12:10 PM, Andy Shevchenko wrote: >> On Wed, Jun 19, 2019 at 06:42:56PM +0200, Titouan Christophe wrote: >>> Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu> >> >>> - find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n' >>> '\0' | \ >>> - xargs -0 modprobe -abq >> >>> + find /sys/ -name modalias -print0 | \ >>> + xargs -0 sort -u | \ >>> + tr '\n' '\0' | \ >>> + xargs -0 modprobe -abq >> >> How this indentation change related to the topic? >> > > This is a preparatory patch to convert this script to the canonical init > script format, as suggested by Arnout (see > http://lists.busybox.net/pipermail/buildroot/2019-May/251199.html) sorry I did not pay attention to the fact that you were only commenting on this particular hunk. I did reindent this command chain for better readability (in my opinion); I can rework that part to better suit the codestyle, if any. Regards, Titouan
On Thu, Jun 20, 2019 at 01:39:32PM +0200, Titouan Christophe wrote: > On 6/20/19 12:44 PM, Titouan Christophe wrote: > > Hello Andy, > > > > On 6/20/19 12:10 PM, Andy Shevchenko wrote: > > > On Wed, Jun 19, 2019 at 06:42:56PM +0200, Titouan Christophe wrote: > > > > Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu> > > > > > > > - find /sys/ -name modalias -print0 | xargs -0 sort -u | tr > > > > '\n' '\0' | \ > > > > - xargs -0 modprobe -abq > > > > > > > + find /sys/ -name modalias -print0 | \ > > > > + xargs -0 sort -u | \ > > > > + tr '\n' '\0' | \ > > > > + xargs -0 modprobe -abq > > > > > > How this indentation change related to the topic? > > > > > > > This is a preparatory patch to convert this script to the canonical init > > script format, as suggested by Arnout (see > > http://lists.busybox.net/pipermail/buildroot/2019-May/251199.html) > > > sorry I did not pay attention to the fact that you were only commenting on > this particular hunk. I did reindent this command chain for better > readability (in my opinion); I can rework that part to better suit the > codestyle, if any. It should be a separate patch explaining why you are doing that, but not in this one.
diff --git a/package/busybox/S10mdev b/package/busybox/S10mdev index 7075b77016..efef4290ba 100644 --- a/package/busybox/S10mdev +++ b/package/busybox/S10mdev @@ -3,21 +3,24 @@ # Start mdev.... # -case "$1" in - start) + +start() { echo "Starting mdev..." echo /sbin/mdev >/proc/sys/kernel/hotplug /sbin/mdev -s # coldplug modules - find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n' '\0' | \ - xargs -0 modprobe -abq - ;; - stop) - ;; - restart|reload) + find /sys/ -name modalias -print0 | \ + xargs -0 sort -u | \ + tr '\n' '\0' | \ + xargs -0 modprobe -abq +} + +case "$1" in + start) + "$1" ;; *) - echo "Usage: $0 {start|stop|restart}" + echo "Usage: $0 start" exit 1 esac
Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu> --- package/busybox/S10mdev | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)