@samitouri / QOSamiQemu / commits / 800eca1371

scripts: mkemmc.sh: Fix output pollution on missing images

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>

Jan Kiszka committed Apr 15, 2026 at 07:46 UTC 800eca1371b1c87e1c7a4af5aff444f2b6059327
1 file changed +2 -2
scripts/mkemmc.sh
+2 -2
@@ -40,7 +40,7 @@ process_size() {
40 alignment=$3
41 image_arg=$4
42 if [ "${image_arg#*:}" = "$image_arg" ]; then
43 - if ! size=$(wc -c < "$image_file" 2>/dev/null); then
43 + if ! size=$(wc -c 2>/dev/null < "$image_file"); then
44 echo "Missing $name image '$image_file'." >&2
45 exit 1
46 fi
@@ -102,7 +102,7 @@ check_truncation() {
102 if [ "$image_file" = "/dev/zero" ]; then
103 return
104 fi
105 - if ! actual_size=$(wc -c < "$image_file" 2>/dev/null); then
105 + if ! actual_size=$(wc -c 2>/dev/null < "$image_file"); then
106 echo "Missing image '$image_file'." >&2
107 exit 1
108 fi