[opensm] fix missing option arg handling to be correct.
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 29 Mar 2010 17:35:20 +0000 (17:35 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 29 Mar 2010 17:35:20 +0000 (17:35 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2756 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/opensm/user/libvendor/winosm_common.c

index 67da8ea..c046336 100644 (file)
@@ -256,7 +256,11 @@ int getopt_long_only(int argc, char *const*argv, const char *optstring,
                             chOpt = '?';
                             if ((longopts[i].has_arg == required_argument) && opterr)
                            {
-                             fprintf (stderr, "Option %s requires argument\n",tok);       
+                             fprintf (stderr,
+                                    "Option '--%s' requires an argument\n",tok);
+                             iArg++;
+                             optind++;
+                             break;
                            }
 
                         }else