[LTP] [PATCH 1/1] shell: Fix handling default parameters in tst_mkfs()
Cyril Hrubis
chrubis@suse.cz
Wed Mar 27 17:03:16 CET 2019
Hi!
> fixes regression when testing df01.sh
>
> Dash does not like shifting more than possible:
> /opt/ltp/testcases/bin/df01.sh: 291: shift: can't shift that many
>
> Fixes: 465faf47f ("shell: Use $TST_FS_TYPE and $TST_DEVICE in tst_mkfs()")
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Hi,
>
> don't like checking $# twice, but don't see right now way to do it
> simpler.
We can do the same thing twice as well, which may be a bit more
readable:
[ $# -ge 1 ] && shift
[ $# -ge 1 ] && shift
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list