diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-10-29 18:41:15 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-10-29 18:41:15 -0700 |
commit | 5c170940c89065df4c7bbc6561cbdfd297363aad (patch) | |
tree | 664acff0745412bd0dcebb32d630ccb2357d33f0 /src/commit.c | |
parent | 57f92ab532610ef1f95ef3fa4761c424d5541d80 (diff) | |
download | vyatta-cfg-5c170940c89065df4c7bbc6561cbdfd297363aad.tar.gz vyatta-cfg-5c170940c89065df4c7bbc6561cbdfd297363aad.zip |
general cleanup of CLI output
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/commit.c b/src/commit.c index a8edbaf..7cd01df 100644 --- a/src/commit.c +++ b/src/commit.c @@ -270,11 +270,12 @@ int main(int argc, char **argv) st = lstat(mod, &statbuf); my_free(mod); if (st < 0 ) { + fprintf(out_stream, "No configuration changes to commit\n"); bye("No configuration changes to commit\n"); - exit(-1); } if(!get_config_lock(get_adirp(), LOCK_NAME)) { + fprintf(out_stream, "Cannot commit: Configuration is locked\n"); bye("Configuration is locked\n"); } @@ -1325,7 +1326,7 @@ static int fin_commit(boolean ok) int a_len = strlen(get_adirp()); set_echo(TRUE); if (!ok){ - printf("Commit FAILED!\n"); + fprintf(out_stream, "Commit failed\n"); return -1; } command = my_malloc(strlen(format1) + m_len + t_len, ""); |