Blame SOURCES/pacemaker-unknown-long-options.patch

1f016a
commit 0f0ceb44be247cf894422d1dab6a67b474e77d12
1f016a
Author: Andrew Beekhof <andrew@beekhof.net>
1f016a
Date:   Thu Jan 15 13:43:48 2015 +1100
1f016a
1f016a
    Fix: cli: Ensure subsequent unknown long options are correctly detected
1f016a
1f016a
diff --git a/lib/common/utils.c b/lib/common/utils.c
1f016a
index d70778d..50b5e91 100644
1f016a
--- a/lib/common/utils.c
1f016a
+++ b/lib/common/utils.c
1f016a
@@ -1802,6 +1802,7 @@ crm_get_option_long(int argc, char **argv, int *index, const char **longname)
1f016a
         long_opts = crm_create_long_opts(crm_long_options);
1f016a
     }
1f016a
 
1f016a
+    *index = 0;
1f016a
     if (long_opts) {
1f016a
         int flag = getopt_long(argc, argv, crm_short_options, long_opts, index);
1f016a