[Openais] Patch improved util.c/openais_exit_error
Steven Dake
sdake at redhat.com
Mon Sep 4 23:26:21 PDT 2006
Hans
Looks good
regards
-steve
On Fri, 2006-09-01 at 12:16 +0200, Hans Feldt wrote:
> Committed revision 1235.
>
> Hans Feldt wrote:
> > Added file and line of caller. Will be useful for troubleshooting. Uses
> > standard exit status.
> >
> > Regards,
> > Hans
> >
> >
> > ------------------------------------------------------------------------
> >
> > Index: exec/util.c
> > ===================================================================
> > --- exec/util.c (revision 1229)
> > +++ exec/util.c (working copy)
> > @@ -83,11 +83,13 @@
> > }
> >
> >
> > -void openais_exit_error (enum e_ais_done err)
> > +void _openais_exit_error (
> > + enum e_ais_done err, const char *file, unsigned int line)
> > {
> > - log_printf (LOG_LEVEL_ERROR, "AIS Executive exiting (%d).\n", err);
> > + log_printf (LOG_LEVEL_ERROR, "AIS Executive exiting with status %d at %s:%u.\n",
> > + err, file, line);
> > log_flush();
> > - exit (err);
> > + exit (EXIT_FAILURE);
> > }
> >
> > char *getSaNameT (SaNameT *name)
> > Index: exec/util.h
> > ===================================================================
> > --- exec/util.h (revision 1229)
> > +++ exec/util.h (working copy)
> > @@ -67,7 +67,9 @@
> > */
> > extern int name_match(SaNameT *name1, SaNameT *name2);
> > extern int mar_name_match(mar_name_t *name1, mar_name_t *name2);
> > -void openais_exit_error (enum e_ais_done err);
> > +#define openais_exit_error(err) _openais_exit_error ((err), __FILE__, __LINE__)
> > +extern void _openais_exit_error (
> > + enum e_ais_done err, const char *file, unsigned int line);
> > extern char *getSaNameT (SaNameT *name);
> > extern char *strstr_rs (const char *haystack, const char *needle);
> > extern void setSaNameT (SaNameT *name, char *str);
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Openais mailing list
> > Openais at lists.osdl.org
> > https://lists.osdl.org/mailman/listinfo/openais
>
> _______________________________________________
> Openais mailing list
> Openais at lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/openais
More information about the Openais
mailing list