diff options
author | Daniil Baturin <daniil@baturin.org> | 2020-02-11 16:11:07 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2020-02-11 16:11:07 +0100 |
commit | 72d0243f10e4df7c2fb7ce35c3d7f333e83bab97 (patch) | |
tree | 313653512384c3d7c7acf7d4dc2d97ad525aa48f | |
parent | 7f6eb1ed2c2a9dc76227ac355446b6d4b6c27733 (diff) | |
download | vyatta-cfg-72d0243f10e4df7c2fb7ce35c3d7f333e83bab97.tar.gz vyatta-cfg-72d0243f10e4df7c2fb7ce35c3d7f333e83bab97.zip |
T2026: use a unique exit code for config parse errors.
-rw-r--r-- | src/cnode/cnode-algorithm.cpp | 2 | ||||
-rw-r--r-- | src/vyos-errors.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/cnode/cnode-algorithm.cpp b/src/cnode/cnode-algorithm.cpp index 7463534..bf3c524 100644 --- a/src/cnode/cnode-algorithm.cpp +++ b/src/cnode/cnode-algorithm.cpp @@ -964,7 +964,7 @@ cnode::showConfig(const string& cfg1, const string& cfg2, } if (!croot1.get() || !croot2.get()) { printf("Cannot parse specified config file(s)\n"); - return 1; + return VYOS_CONFIG_PARSE_ERROR; } if (show_cmds) { diff --git a/src/vyos-errors.h b/src/vyos-errors.h index 790f4c4..4ac9f57 100644 --- a/src/vyos-errors.h +++ b/src/vyos-errors.h @@ -2,3 +2,4 @@ #define VYOS_GENERAL_FAILURE 1 #define VYOS_INVALID_PATH 2 #define VYOS_EMPTY_CONFIG 3 +#define VYOS_CONFIG_PARSE_ERROR 4 |