X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fovs-vsctl.c;h=c55818bd29c201f592e3932020d754956693c0c4;hb=e0ce13c4dc34f44d81e0001882a0be88321b5c87;hp=56cb7450d08ee0fd71ecc764c057ec5dc72e0d2c;hpb=b31bcf60cf4fbabca0182196c97b3004e42f53e5;p=openvswitch diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 56cb7450..c55818bd 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -531,7 +531,7 @@ default_db(void) { static char *def; if (!def) { - def = xasprintf("unix:%s/db.sock", ovs_rundir); + def = xasprintf("unix:%s/db.sock", ovs_rundir()); } return def; } @@ -1699,6 +1699,14 @@ verify_controllers(struct ovsrec_bridge *bridge) } } +static void +pre_controller(struct vsctl_context *ctx) +{ + pre_get_info(ctx); + + ovsdb_idl_add_column(ctx->idl, &ovsrec_controller_col_target); +} + static void cmd_get_controller(struct vsctl_context *ctx) { @@ -3266,10 +3274,10 @@ static const struct vsctl_command_syntax all_commands[] = { {"iface-to-br", 1, 1, pre_get_info, cmd_iface_to_br, NULL, "", RO}, /* Controller commands. */ - {"get-controller", 1, 1, pre_get_info, cmd_get_controller, NULL, "", RO}, - {"del-controller", 1, 1, pre_get_info, cmd_del_controller, NULL, "", RW}, - {"set-controller", 1, INT_MAX, pre_get_info, cmd_set_controller, NULL, "", - RW}, + {"get-controller", 1, 1, pre_controller, cmd_get_controller, NULL, "", RO}, + {"del-controller", 1, 1, pre_controller, cmd_del_controller, NULL, "", RW}, + {"set-controller", 1, INT_MAX, pre_controller, cmd_set_controller, NULL, + "", RW}, {"get-fail-mode", 1, 1, pre_get_info, cmd_get_fail_mode, NULL, "", RO}, {"del-fail-mode", 1, 1, pre_get_info, cmd_del_fail_mode, NULL, "", RW}, {"set-fail-mode", 2, 2, pre_get_info, cmd_set_fail_mode, NULL, "", RW},