summaryrefslogtreecommitdiff
path: root/src/check_tmpl.c
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-03-12 11:11:26 -0800
committerStig Thormodsrud <stig@vyatta.com>2010-03-12 11:11:26 -0800
commit0c3f37837a29c9e1455ac8bbfd0e40f2b8171dc6 (patch)
tree5f93ec172a26fa0367edd7ae28947ff0c290a49d /src/check_tmpl.c
parentee9120efdf18d000315eed8f0ff85b9dbc22a771 (diff)
downloadvyatta-cfg-0c3f37837a29c9e1455ac8bbfd0e40f2b8171dc6.tar.gz
vyatta-cfg-0c3f37837a29c9e1455ac8bbfd0e40f2b8171dc6.zip
Print node name before the warning message.
Diffstat (limited to 'src/check_tmpl.c')
-rw-r--r--src/check_tmpl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/check_tmpl.c b/src/check_tmpl.c
index cbb9aa1..109c76b 100644
--- a/src/check_tmpl.c
+++ b/src/check_tmpl.c
@@ -7,7 +7,7 @@
#include "cli_val.h"
int
-check_line_continuation(FILE *ftmpl)
+check_line_continuation(FILE *ftmpl, char *node_name)
{
char buf[256];
int line = 0;
@@ -22,6 +22,7 @@ check_line_continuation(FILE *ftmpl)
--len;
}
if (len >= 0 && buf[len] == '\\') {
+ printf("[%s]\n", node_name);
printf("Warning: \"backslash + space\" detected at the end of line %d.\n"
" This will not work as line continuation.\n",
line);
@@ -59,7 +60,7 @@ main(int argc, char **argv)
}
/* check for other errors */
- if (check_line_continuation(ftmpl) != 0) {
+ if (check_line_continuation(ftmpl, argv[1]) != 0) {
exit(-1);
}
fseek(ftmpl, 0, SEEK_SET);