diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2010-03-12 11:11:26 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2010-03-12 11:11:26 -0800 |
commit | 0c3f37837a29c9e1455ac8bbfd0e40f2b8171dc6 (patch) | |
tree | 5f93ec172a26fa0367edd7ae28947ff0c290a49d | |
parent | ee9120efdf18d000315eed8f0ff85b9dbc22a771 (diff) | |
download | vyatta-cfg-0c3f37837a29c9e1455ac8bbfd0e40f2b8171dc6.tar.gz vyatta-cfg-0c3f37837a29c9e1455ac8bbfd0e40f2b8171dc6.zip |
Print node name before the warning message.
-rw-r--r-- | src/check_tmpl.c | 5 |
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); |