________________________________ From: Tzachi Dar [mailto:[email protected]] Sent: Monday, August 16, 2010 1:43 PM To: Smith, Stan; [email protected] Cc: Yevgeny Kliteynik Subject: RE: Allow opensm to read the command line parameters
My fix is needed in order to make opensm params work. One can simply run "opensm --help" and see that it ignores it. Are you working with 3.3.3 or the latest svn 3.3.6? When I run 'opensm --help' (3.3.6) I get the expected help output. We can also fix the getopt. Does anyone know where is the Linux implementation of it? Thanks Tzachi From: Smith, Stan [mailto:[email protected]] Sent: Monday, August 16, 2010 8:31 PM To: Tzachi Dar; [email protected] Cc: Yevgeny Kliteynik Subject: RE: Allow opensm to read the command line parameters Tzachi, As you know there are numerous differences between Windows OpenSM and the Linux OpenSM. Some differences are being resolved slowly as the Linux community resists changes for Windows (no offense intended), while others likely will not be resolved as they are Windows environment issues (Windows Service creation/run interface vs. Linux daemon process creation interface). Windows OpenSM is close, although some assembly is required; measured in differencing files and figuring out the 'right' choice, which used to take weeks and now is down to a few hours. For each Linux OpenSM release, the Windows code base takes step in getting closer to the Linux OpenSM code base. I don't disagree with your thoughts in that keeping the same code base is a win for all parties - work-in-progress. :-) The 'optind = 0; ' was required by getopt() to make the code work correctly. I agree with Sean, that since OpenSM no longer has a local version of getopt() we should 'fix' the Windows getopt() to correctly handle the situation if that is the correct direction. stan. ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Tzachi Dar Sent: Monday, August 16, 2010 5:30 AM To: [email protected] Cc: Yevgeny Kliteynik Subject: [ofw] Allow opensm to read the command line parameters Please note that although this solution works for opensm it creates a change from the Linux code base. A different solution might be needed if we want to keep the same code base . Thanks Tzachi Index: opensm/main.c =================================================================== --- opensm/main.c (revision 6229) +++ opensm/main.c (working copy) @@ -725,7 +725,7 @@ } } while (next_option != -1); - optind = 0; /* reset command line */ + optind = 1; /* reset command line */ if (config_file && osm_subn_parse_conf_file(config_file, &opt) < 0) printf("\nFail to parse config file \'%s\'\n", config_file);
_______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
