diff options
author | Jakub Sitnicki <jkbs@redhat.com> | 2018-07-19 15:51:14 +0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-07-23 16:09:43 -0700 |
commit | a95199f26a773a90d5ff71be7d9734f9fb963170 (patch) | |
tree | 2f7d429846f7460c18f89fe55c7e389fef40f33d /vtep | |
parent | 6441935951b35cef5ef654e5d19963ae338f9bb7 (diff) | |
download | openvswitch-a95199f26a773a90d5ff71be7d9734f9fb963170.tar.gz |
db-ctl-base: Propagate errors from the commands parser.
Let the caller decide how to handle the error. Prepare for using the
parser in ovn-nbctl daemon mode.
Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'vtep')
-rw-r--r-- | vtep/vtep-ctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c index 3c5ffa745..35ab43588 100644 --- a/vtep/vtep-ctl.c +++ b/vtep/vtep-ctl.c @@ -111,8 +111,11 @@ main(int argc, char *argv[]) char *args = process_escape_args(argv); shash_init(&local_options); parse_options(argc, argv, &local_options); - commands = ctl_parse_commands(argc - optind, argv + optind, &local_options, - &n_commands); + char *error = ctl_parse_commands(argc - optind, argv + optind, + &local_options, &commands, &n_commands); + if (error) { + ctl_fatal("%s", error); + } VLOG(ctl_might_write_to_db(commands, n_commands) ? VLL_INFO : VLL_DBG, "Called as %s", args); |