Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commit... Commit: e0fae3825aa2aff58cda631e77ea958c02cb1ce8 Parent: 744df71768fc561693bee28e635501cf641d8d29 Author: Marek 'marx' Grac mgrac@redhat.com AuthorDate: Mon Oct 19 14:03:19 2009 +0200 Committer: Marek 'marx' Grac mgrac@redhat.com CommitterDate: Mon Oct 19 14:03:19 2009 +0200
fence_rackswich: Accept unknown options without value
--- fence/agents/rackswitch/do_rack.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/fence/agents/rackswitch/do_rack.c b/fence/agents/rackswitch/do_rack.c index a4bad8d..854b475 100644 --- a/fence/agents/rackswitch/do_rack.c +++ b/fence/agents/rackswitch/do_rack.c @@ -239,9 +239,13 @@ static void get_options(int argc, char **argv) } *value = 0; if( (value = strchr(arg, '=')) == NULL){ + /* in this agent we can ignore options without value + * as we don't need any of them, here. But we should + * accept and ignore them. + */ fprintf(stderr, "invalid input: '%s'\n", arg); - exit(DID_FAILURE); - } + continue; + } *value = 0; value++; /* bahfuck. "agent" is not passed to us anyway
cluster-commits@lists.fedorahosted.org