[openib-general] progress...but opensm crashed
Bernhard Fischer
blist at aon.at
Wed Jan 5 10:19:03 PST 2005
Hi,
Sorry for nitpicking.. opensm -h doesn't exit as advertised.
-------------- next part --------------
diff -rup openib.gen2.oorig/upstream/gen2/trunk/src/userspace/management/osm/opensm/main.c openib.gen2/upstream/gen2/trunk/src/userspace/management/osm/opensm/main.c
--- openib.gen2.oorig/upstream/gen2/trunk/src/userspace/management/osm/opensm/main.c 2005-01-05 10:16:25.000000000 +0100
+++ openib.gen2/upstream/gen2/trunk/src/userspace/management/osm/opensm/main.c 2005-01-05 19:03:22.325418049 +0100
@@ -104,7 +104,7 @@
instantiating more than one opensm object.
*/
osm_opensm_t osm;
-volatile int osm_exit_flag;
+volatile int osm_exit_flag = 0;
#define GUID_ARRAY_SIZE 64
@@ -246,6 +246,7 @@ show_usage(void)
printf( "-?\n"
" Display this usage info then exit.\n\n" );
fflush( stdout );
+ osm_exit_flag = 1;
}
/**********************************************************************
@@ -598,14 +599,10 @@ main(
break;
case 'h':
- show_usage();
- return 0;
- break;
-
case '?':
show_usage();
- return 0;
break;
+
case -1:
break; /* done with option */
default: /* something wrong */
@@ -614,6 +611,10 @@ main(
}
while(next_option != -1);
+ if (osm_exit_flag) {
+ complib_exit();
+ return( 0 );
+ }
if (opt.log_file != NULL )
printf(" Log File: %s\n", opt.log_file );
/* Done with options description */
More information about the general
mailing list