summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-02-20 11:07:18 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-02-20 11:10:54 +0100
commit845df3c7d8daf29ee86e27114a4bc7532937c25c (patch)
tree461362ab9bae69d8d8680e2687f48d1d5288eaf7
parent3b4b52686d71b0f8c21cce0f0b50c22703c9f9dc (diff)
downloadptxdist-845df3c7d8daf29ee86e27114a4bc7532937c25c.tar.gz
ptxdist-845df3c7d8daf29ee86e27114a4bc7532937c25c.tar.xz
ptxd_kconfig_create_config_merge: add sanity check to detect parse errors
Otherwise, 'config' may be called with invalid arguments. This catches the error earlier and provides a hint where the error occured. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/lib/ptxd_lib_kconfig.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_lib_kconfig.sh b/scripts/lib/ptxd_lib_kconfig.sh
index 9208ad715..fd0c36c17 100644
--- a/scripts/lib/ptxd_lib_kconfig.sh
+++ b/scripts/lib/ptxd_lib_kconfig.sh
@@ -128,6 +128,10 @@ ptxd_kconfig_create_config_merge() {
elif [ -z "${saved_md5}" -a -z "${b}" ]; then
saved_md5="${a}"
continue
+ elif [ -z "${b}" ]; then
+ ptxd_bailout "Failed to parse" \
+ "$(ptxd_print_path "${diff}")" \
+ "parse error in:" "'${a}'"
fi
arg=
case "${b}" in