[ofw] RE: OpenSM patches for saquery porting - 2 of 6 patches.

Tzachi Dar tzachid at mellanox.co.il
Mon Feb 2 06:53:38 PST 2009


Sean and Stan,

Have you reached a conclusion of how to use getopt?

Can we commit the original patch?

Thanks
Tzachi 

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Sean Hefty
> Sent: Saturday, January 31, 2009 1:08 AM
> To: Smith, Stan; Yevgeny Kliteynik
> Cc: ofw at lists.openfabrics.org
> Subject: [ofw] RE: OpenSM patches for saquery porting - 2 of 
> 6 patches.
> 
> >+
> >+#ifndef _GETOPT_H_
> > /* Global variables for getopt_long */  char *optarg;
> > /*
> >@@ -36,6 +38,7 @@
> >   int *flag;
> >   int val;
> > };
> >+#endif
> >
> >
> > 
> >/************************************************************
> **********
> >**/
> >@@ -43,11 +46,14 @@
> > get_char_option(const char* optstring,
> >                              char*const* argv,int argc,
> >                              int iArg, int* opt_ind,char* opt_p);
> >+
> > int
> > getopt_long_only(int argc, char *const*argv,
> >                          const char *optstring,
> >                          const struct option *longopts, int 
> > *longindex); 
> > 
> /*********************************************************************
> > *****/
> 
> The duplicate implementation of getopt should just be 
> removed, with the code using the common one provided by 
> etc\user\getopt.c and inc\user\getopt.h.
> 
> 
> 
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
> 



More information about the ofw mailing list