From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1087 invoked by alias); 29 Jan 2009 14:28:51 -0000 Received: (qmail 1081 invoked by alias); 29 Jan 2009 14:28:51 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS X-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com Subject: cluster: master - cman: prevent accidents with cman_tool expected To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: a1620c2b08020ec676f4e0ab451f627393124142 X-Git-Newrev: 684e8533f7a6e360d519382a312fe76b9dff8511 From: Christine Caulfield Message-Id: <20090129142828.211F6120569@lists.fedorahosted.org> Date: Thu, 29 Jan 2009 14:28:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00315.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=684e8533f7a6e360d519382a312fe76b9dff8511 Commit: 684e8533f7a6e360d519382a312fe76b9dff8511 Parent: a1620c2b08020ec676f4e0ab451f627393124142 Author: Christine Caulfield AuthorDate: Thu Jan 29 14:28:08 2009 +0000 Committer: Christine Caulfield CommitterDate: Thu Jan 29 14:28:08 2009 +0000 cman: prevent accidents with cman_tool expected Signed-off-by: Christine Caulfield --- cman/cman_tool/main.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/cman/cman_tool/main.c b/cman/cman_tool/main.c index 7f6dc6c..ef71eca 100644 --- a/cman/cman_tool/main.c +++ b/cman/cman_tool/main.c @@ -532,6 +532,10 @@ static void set_expected(commandline_t *comline) cman_handle_t h; int result; + if (comline->expected_votes == 0) { + die("expected_votes not specified"); + } + h = open_cman_handle(1); if ((result = cman_set_expected_votes(h, comline->expected_votes)))