On Mon, 2 Mar 2009 16:06:59 -0800
Ira Weiny <[email protected]> wrote:

> On Sun, 1 Mar 2009 10:08:04 +0200
> Sasha Khapyorsky <[email protected]> wrote:
> 
> > On 19:05 Thu 19 Feb     , Ira Weiny wrote:
> 
> [snip]
> 
> > >  
> > > - madrpc_init(ibd_ca, ibd_ca_port, mgmt_classes, 3);
> > > + srcport = mad_rpc_open_port(ibd_ca, ibd_ca_port, mgmt_classes, 3);
> > > + if (!srcport)
> > > +         IBERROR("Failed to open '%s' port '%d'", ibd_ca, ibd_ca_port);
> > 
> > Here and in almost all other infiniband-diags patches:
> > 
> > madrpc_init() in case of failures calls IBPANIC() which prints error
> > message and calls exit(). Unlike this mad_rpc_open_port() sets errno and
> > returns NULL, IBERROR() just prints error message - the program will
> > continue execution...
> 
> Good catch I will update with a proper exit call.
>

Actually I think I was right the first time.  IBERROR is a macro which calls
iberror.  iberror calls exit(-1) at the end.

ibdiag_common.h:
   #define IBERROR(fmt, ...) iberror(__FUNCTION__, fmt, ## __VA_ARGS__)

ibdiag_common.c:
   void iberror(const char *fn, char *msg, ...)
   {
   ...
        exit(-1);
   }

Is this not correct?  We can change the behavior of IBERROR but I think we
have enough to deal with right now.

Ira

> [snip]
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to