[OPENSM] exit immediately on option parsing errors.
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 29 Mar 2010 17:39:54 +0000 (17:39 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 29 Mar 2010 17:39:54 +0000 (17:39 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2757 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/opensm/user/opensm/main.c

index 9608c17..3405867 100644 (file)
@@ -719,6 +719,15 @@ opensm_main(void *OsmMainArgs)
                        config_file = optarg;\r
                        printf("Config file is `%s`:\n", config_file);\r
                        break;\r
+#ifdef __WIN__\r
+               /* stop here if option parsing problems.\r
+                * Allows error message to viewed and not lost in\r
+                * verbose usage output.\r
+                */\r
+               case ':':\r
+               case '?':\r
+                       exit(1);\r
+#endif\r
                default:\r
                        break;\r
                }\r