mk: remove xprintf

totally useless function. all it does is print
quotes. just printf the args into awk

this does literally the same thing. the output
will literally be the same.

unclear thinking == unclear code

right thinking == this patch

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-09-14 11:41:03 +01:00
parent b32dd39262
commit d9ca4265ef
+2 -16
View File
@@ -50,7 +50,8 @@ err()
elif [ $# -gt 1 ]; then
printf "ERROR %s: %s: in command with args: " "$0" "$1" 1>&2
shift 1
xprintf "$@" 1>&2
printf '%s\n' "$@" | awk '{printf "\"%s\" ", $0}'
printf "\n"
else
printf "ERROR, but no arguments provided to err\n" 1>&2
fi
@@ -58,21 +59,6 @@ err()
exit 1
}
xprintf()
{
xprintfargs=0
while [ $# -gt 0 ]; do
printf "\"%s\"" "$1"
[ $# -gt 1 ] && \
printf " "
xprintfargs=1
shift 1
done
[ $xprintfargs -gt 0 ] && \
printf "\n"; :
}
(
xbarg0="$0"
[ "${xbarg0##*/}" = "$xbarg0" ] && \