From dad0a41462b0c2fda71e46b899eb8a792aac59d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Posp=C3=AD=C5=A1il?= Date: Fri, 17 Jul 2009 09:24:16 +0000 Subject: [PATCH] added SYSTEM_FATAL --- org.glite.lbjp-common.log/log.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/org.glite.lbjp-common.log/log.h b/org.glite.lbjp-common.log/log.h index fc66000..7f681fa 100644 --- a/org.glite.lbjp-common.log/log.h +++ b/org.glite.lbjp-common.log/log.h @@ -37,6 +37,12 @@ extern "C" { else \ glite_common_log(LOG_CATEGORY_CONTROL,LOG_PRIORITY_ERROR,"%s\n",my_err); } +#define SYSTEM_FATAL(my_err) { \ + if (errno !=0 ) \ + glite_common_log(LOG_CATEGORY_CONTROL,LOG_PRIORITY_FATAL,"%s: %s\n",my_err,strerror(errno)); \ + else \ + glite_common_log(LOG_CATEGORY_CONTROL,LOG_PRIORITY_FATAL,"%s\n",my_err); } + /* logging functions */ /** -- 1.8.2.3