fs/cpio/init: preserve arguments
authorGaël PORTAY <gael.portay@savoirfairelinux.com>
Wed, 21 Feb 2018 21:02:16 +0000 (16:02 -0500)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 26 Feb 2018 19:49:40 +0000 (20:49 +0100)
Use "$@" instead of $* to preserve arguments containing spaces.

The shell expands "$@" as "$1" "$2" "$3"... while it expands $@ as $1 $2
$3. With the second form, we loses spaces in positional parameters.

Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
fs/cpio/init

index a2754821776997c5f8eb9873eb2ede68c091327e..dbe09ac68ee538232e9ac06f63ba59ba6f050d75 100755 (executable)
@@ -4,4 +4,4 @@
 exec 0</dev/console
 exec 1>/dev/console
 exec 2>/dev/console
-exec /sbin/init $*
+exec /sbin/init "$@"