[ofw] [PATCH] [OPENSM] exit immediately on option parsing errors.

Smith, Stan stan.smith at intel.com
Mon Mar 29 11:15:32 PDT 2010


Signed-off-by: stan smith <stan.smith at intel.com>

Revision: 2757
Author: stansmith
Date: 10:39:54 AM, Monday, March 29, 2010
Message:
[OPENSM] exit immediately on option parsing errors.
----
Modified : /gen1/trunk/ulp/opensm/user/opensm/main.c

--- A/ulp/opensm/user/opensm/main.c     Mon Mar 29 10:38:28 2010
+++ B/ulp/opensm/user/opensm/main.c     Fri Mar 26 13:30:33 2010
@@ -719,6 +719,15 @@
                        config_file = optarg;
                        printf("Config file is `%s`:\n", config_file);
                        break;
+#ifdef __WIN__
+               /* stop here if option parsing problems.
+                * Allows error message to viewed and not lost in
+                * verbose usage output.
+                */
+               case ':':
+               case '?':
+                       exit(1);
+#endif
                default:
                        break;
                }



More information about the ofw mailing list