cluster: STABLE3 - fence_rackswitch: Accept unknown options without value
Marek Grác
marx at fedoraproject.org
Mon Oct 19 13:06:58 UTC 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a047a6ead0e095d96925997f92d3d224f00e9da8
Commit: a047a6ead0e095d96925997f92d3d224f00e9da8
Parent: 3fdca6cd60c75ddccde21ae4c3298efd75f09455
Author: Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate: Mon Oct 19 15:04:08 2009 +0200
Committer: Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Mon Oct 19 15:04:08 2009 +0200
fence_rackswitch: 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 2b5efe2..32037c1 100644
--- a/fence/agents/rackswitch/do_rack.c
+++ b/fence/agents/rackswitch/do_rack.c
@@ -237,9 +237,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
More information about the cluster-commits
mailing list