Skip to content

Commit 4fa5241

Browse files
gportayjacmet
authored andcommitted
fs/cpio/init: preserve arguments
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 <[email protected]> Reviewed-by: Adrian Perez de Castro <[email protected]> Signed-off-by: Peter Korsgaard <[email protected]>
1 parent 1e7ee5a commit 4fa5241

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cpio/init

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
exec 0</dev/console
55
exec 1>/dev/console
66
exec 2>/dev/console
7-
exec /sbin/init $*
7+
exec /sbin/init "$@"

0 commit comments

Comments
 (0)