From fd71615bbbe2c126d0ca8295df483c62153abf8e Mon Sep 17 00:00:00 2001 From: Stan Smith Date: Mon, 29 Mar 2010 17:35:20 +0000 Subject: [PATCH] [opensm] fix missing option arg handling to be correct. git-svn-id: svn://openib.tc.cornell.edu/gen1@2756 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/ulp/opensm/user/libvendor/winosm_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trunk/ulp/opensm/user/libvendor/winosm_common.c b/trunk/ulp/opensm/user/libvendor/winosm_common.c index 67da8ea2..c0463362 100644 --- a/trunk/ulp/opensm/user/libvendor/winosm_common.c +++ b/trunk/ulp/opensm/user/libvendor/winosm_common.c @@ -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 -- 2.41.0