summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2026-04-15 07:46:06 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2026-05-12 07:03:09 +0200
commit800eca1371b1c87e1c7a4af5aff444f2b6059327 (patch)
tree14b11cbb3e4697887414c12924eef33e4417ed63 /scripts
parent27d14251b904e6dd60c1053a893b52e085f48a3a (diff)
downloadqemu-800eca1371b1c87e1c7a4af5aff444f2b6059327.tar.gz
qemu-800eca1371b1c87e1c7a4af5aff444f2b6059327.zip
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkemmc.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/mkemmc.sh b/scripts/mkemmc.sh
index 429388213c..3d8546cdaa 100755
--- a/scripts/mkemmc.sh
+++ b/scripts/mkemmc.sh
@@ -40,7 +40,7 @@ process_size() {
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
@@ -102,7 +102,7 @@ check_truncation() {
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