Re: [PATCH] livepatch/selftests: use "$@" to preserve argument list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 08, 2019 at 03:57:37PM -0500, Joe Lawrence wrote:
> The livepatch selftest functions.sh library uses "$*" and an
> intermediate variable to extract and then pass arguments from function
> to function call.  The effect of this combination is that the argument
> list is flattened into a single argument.  Sometimes this is benign, but
> in cases like __load_mod(), the modprobe invocation will interpret all
> the module parameters as a single parameter.
> 
> Drop the intermediate variable and use the "$@" special parameter as
> described in the bash manual.
> 
> Link: https://www.gnu.org/software/bash/manual/bash.html#Special-Parameters
> Signed-off-by: Joe Lawrence <joe.lawrence@xxxxxxxxxx>

Reviewed-by: Kamalesh Babulal <kamalesh@xxxxxxxxxxxxxxxxxx>

-- 
Kamalesh




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux