remove ErrorF
authorBoram Park <boram1288.park@samsung.com>
Wed, 12 Jun 2013 07:50:04 +0000 (16:50 +0900)
committerBoram Park <boram1288.park@samsung.com>
Mon, 17 Jun 2013 08:44:35 +0000 (17:44 +0900)
Change-Id: Id23a9ad72ec3844aee3bc8f1db719530908746b4

lib/xdbg_log.h

index f7cfaf2..25ec4ec 100644 (file)
@@ -41,6 +41,15 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <os.h>
 #include <dlog.h>
 
+unsigned int xDbgLogGetModule (char *name);
+
+#define _C(b,s)             (((b) >> (s)) & 0xFF)
+#define _B(c,s)             ((((unsigned int)(c)) & 0xff) << (s))
+#define XDBG_M(a,b,c,d)     (_B(d,24)|_B(c,16)|_B(b,8)|_B(a,0))
+
+/* debug module for XDBG */
+#define MXDBG    XDBG_M('X','D','B','G')
+
 // Masks
 #define XLOG_MASK_LOGLEVEL   0x000000FF
 #define XLOG_MASK_OPTIONS    0xFFFFFF00
@@ -109,12 +118,12 @@ void* xDbgLog            (unsigned int module, int logoption, const char *file,
 
 #define XDBG_NEVER_GET_HERE(mod)          XLOG_ERROR(mod, "[%s:%d] ** NEVER GET HERE **\n", __FUNCTION__,__LINE__)
 
-#define XDBG_WARNING_IF_FAIL(cond)         {if (!(cond)) { ErrorF ("[%s] '%s' failed.\n", __FUNCTION__, #cond);}}
-#define XDBG_RETURN_IF_FAIL(cond)          {if (!(cond)) { ErrorF ("[%s] '%s' failed.\n", __FUNCTION__, #cond); return; }}
-#define XDBG_RETURN_VAL_IF_FAIL(cond, val) {if (!(cond)) { ErrorF ("[%s] '%s' failed.\n", __FUNCTION__, #cond); return val; }}
-#define XDBG_RETURN_VAL_IF_ERRNO(cond, val, errno)       {if (!(cond)) { ErrorF ("[%s] '%s' failed. (err=%s(%d))\n", __FUNCTION__, #cond, strerror(errno), errno); return val; }}
-#define XDBG_GOTO_IF_FAIL(cond, dst)       {if (!(cond)) { ErrorF ("[%s] '%s' failed.\n", __FUNCTION__, #cond); goto dst; }}
-#define XDBG_GOTO_IF_ERRNO(cond, dst, errno)       {if (!(cond)) { ErrorF ("[%s] '%s' failed. (err=%s(%d))\n", __FUNCTION__, #cond, strerror(errno), errno); goto dst; }}
+#define XDBG_WARNING_IF_FAIL(cond)         {if (!(cond)) { XDBG_ERROR (MXDBG, "'%s' failed.\n", #cond);}}
+#define XDBG_RETURN_IF_FAIL(cond)          {if (!(cond)) { XDBG_ERROR (MXDBG, "'%s' failed.\n", #cond); return; }}
+#define XDBG_RETURN_VAL_IF_FAIL(cond, val) {if (!(cond)) { XDBG_ERROR (MXDBG, "'%s' failed.\n", #cond); return val; }}
+#define XDBG_RETURN_VAL_IF_ERRNO(cond, val, errno)       {if (!(cond)) { XDBG_ERRNO (MXDBG, "'%s' failed.\n", #cond); return val; }}
+#define XDBG_GOTO_IF_FAIL(cond, dst)       {if (!(cond)) { XDBG_ERROR ("'%s' failed.\n", #cond); goto dst; }}
+#define XDBG_GOTO_IF_ERRNO(cond, dst, errno)       {if (!(cond)) { XDBG_ERRNO (MXDBG, "'%s' failed.\n", #cond); goto dst; }}
 
 #define XDBG_REPLY(fmt, ARG...)  \
     do { \
@@ -126,13 +135,4 @@ void* xDbgLog            (unsigned int module, int logoption, const char *file,
         } \
     } while (0)
 
-unsigned int xDbgLogGetModule (char *name);
-
-#define _C(b,s)             (((b) >> (s)) & 0xFF)
-#define _B(c,s)             ((((unsigned int)(c)) & 0xff) << (s))
-#define XDBG_M(a,b,c,d)     (_B(d,24)|_B(c,16)|_B(b,8)|_B(a,0))
-
-/* debug module for XDBG */
-#define MXDBG    XDBG_M('X','D','B','G')
-
 #endif  /* __XDBG_LOG_H__ */