Reorder the redirections so that the 2>/dev/null can actually take
effect.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
Message-ID: <
b9d603b7396719f38e03cd969a4ac1b48f5ea96a.
1776231967.git.jan.kiszka@siemens.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
alignment=$3
image_arg=$4
if [ "${image_arg#*:}" = "$image_arg" ]; then
- if ! size=$(wc -c < "$image_file" 2>/dev/null); then
+ if ! size=$(wc -c 2>/dev/null < "$image_file"); then
echo "Missing $name image '$image_file'." >&2
exit 1
fi
if [ "$image_file" = "/dev/zero" ]; then
return
fi
- if ! actual_size=$(wc -c < "$image_file" 2>/dev/null); then
+ if ! actual_size=$(wc -c 2>/dev/null < "$image_file"); then
echo "Missing image '$image_file'." >&2
exit 1
fi