From: Justin Pettit Date: Tue, 12 Jan 2010 00:57:29 +0000 (-0800) Subject: ovs-vsctl: Print correct fail-mode X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d35a4ea82fb76398025d833d30d11d0d68050e56;p=openvswitch ovs-vsctl: Print correct fail-mode When printing the fail-mode, ovs-vsctl would always attempt to print the top-level one--even if it didn't exist. So, in addition to sometimes being wrong, it could cause segfaults. Thanks to Peter Balland for reporting the error. Bug #2374 --- diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 3a73a232..725988a5 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -1345,7 +1345,7 @@ cmd_get_fail_mode(struct vsctl_context *ctx) } if (fail_mode && strlen(fail_mode)) { - ds_put_format(&ctx->output, "%s\n", info.ctrl->fail_mode); + ds_put_format(&ctx->output, "%s\n", fail_mode); } free_info(&info);