summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-02-26 16:15:18 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2008-02-26 16:15:18 -0800
commitaf75cfaa93b1ac933bb8b5ecec64fcc0c269a013 (patch)
treedc35b7c779bec089aa33aad7c6a4ffe2867164db /src
parentc1f98db047844f6f0f558ddca554b9b21f71ff49 (diff)
downloadvyatta-cfg-af75cfaa93b1ac933bb8b5ecec64fcc0c269a013.tar.gz
vyatta-cfg-af75cfaa93b1ac933bb8b5ecec64fcc0c269a013.zip
fix for bug 2868: return failure for invalid values.
Diffstat (limited to 'src')
-rw-r--r--src/cli_new.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cli_new.c b/src/cli_new.c
index 353babd..1ecbe83 100644
--- a/src/cli_new.c
+++ b/src/cli_new.c
@@ -745,11 +745,12 @@ int char2val(vtw_def *def, char *value, valstruct *valp)
if (!token)
return 0;
if (token != EOL) {
+ fprintf(out_stream, "\"%s\" is not a valid value\n", value);
print_msg("Badly formed value in %s\n",
m_path.path + m_path.print_offset);
if (token == VALUE)
my_free(get_cli_value_ptr()->val);
- return 0;
+ return -1;
}
}
return 0;