X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fovs-vsctl.c;h=c55818bd29c201f592e3932020d754956693c0c4;hb=e0ce13c4dc34f44d81e0001882a0be88321b5c87;hp=acdcaf31739654a31f5c7231de0a0fd143106751;hpb=fbd8715e4b6f7f077a8cef2d0225f9c1a698c104;p=openvswitch diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index acdcaf31..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) { @@ -1973,6 +1981,16 @@ static const struct vsctl_table_class tables[] = { {{&ovsrec_table_port, &ovsrec_port_col_name, &ovsrec_port_col_qos}, {NULL, NULL, NULL}}}, + {&ovsrec_table_monitor, + {{&ovsrec_table_interface, + &ovsrec_interface_col_name, + &ovsrec_interface_col_monitor}, + {NULL, NULL, NULL}}}, + + {&ovsrec_table_maintenance_point, + {{NULL, NULL, NULL}, + {NULL, NULL, NULL}}}, + {&ovsrec_table_queue, {{NULL, NULL, NULL}, {NULL, NULL, NULL}}}, @@ -3256,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},