diff options
author | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2009-03-19 20:56:09 +0100 |
---|---|---|
committer | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2009-03-19 20:56:09 +0100 |
commit | 6a21d65d2840c58cfa7cd749a04669d8f7980646 (patch) | |
tree | 00b1aa153b69cda8cf9406c4700fd7730c34d3a5 /recipes/ixp4xx/ixp-osal-2.1.1/assert.patch | |
parent | dcfe7349b369a87881cf1fa43085d9e9c5609fcf (diff) | |
parent | 6f854d71c347475d53d5080a5490625345d95d12 (diff) |
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'recipes/ixp4xx/ixp-osal-2.1.1/assert.patch')
-rw-r--r-- | recipes/ixp4xx/ixp-osal-2.1.1/assert.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes/ixp4xx/ixp-osal-2.1.1/assert.patch b/recipes/ixp4xx/ixp-osal-2.1.1/assert.patch new file mode 100644 index 0000000000..a03113dcc2 --- /dev/null +++ b/recipes/ixp4xx/ixp-osal-2.1.1/assert.patch @@ -0,0 +1,41 @@ +# Unnecessary patch - reduces the code size slightly, gives clearer +# messages if IX_OSAL_ENSURE_ON is set +# include/IxOsalAssert.h | 4 ++-- +# os/linux/include/core/IxOsalOsAssert.h | 9 ++++++++- +# 2 files changed, 10 insertions(+), 3 deletions(-) +# +--- ixp_osal/include/IxOsalAssert.h 1970-01-01 00:00:00.000000000 +0000 ++++ ixp_osal/include/IxOsalAssert.h 1970-01-01 00:00:00.000000000 +0000 +@@ -72,8 +72,8 @@ + */ + #ifdef IX_OSAL_ENSURE_ON + #define IX_OSAL_ENSURE(c, str) do { \ +-if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, str, \ +-0, 0, 0, 0, 0, 0); } while (0) ++if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, __FILE__ ": line %d: " str, \ ++__LINE__, 0, 0, 0, 0, 0); } while (0) + + #else + #define IX_OSAL_ENSURE(c, str) +--- ixp_osal/os/linux/include/core/IxOsalOsAssert.h 1970-01-01 00:00:00.000000000 +0000 ++++ ixp_osal/os/linux/include/core/IxOsalOsAssert.h 1970-01-01 00:00:00.000000000 +0000 +@@ -47,11 +47,18 @@ + + #ifndef IxOsalOsAssert_H + #define IxOsalOsAssert_H ++#ifdef IX_OSAL_ENSURE_ON + #define IX_OSAL_OS_ASSERT(c) if(!(c)) \ + { \ +- ixOsalLog (IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, "Assertion failure \n", 0, 0, 0, 0, 0, 0);\ ++ ixOsalLog (IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, "%s line %d: Assertion failure: %s\n", (int)__FILE__, __LINE__, (int)#c, 0, 0, 0);\ + BUG(); \ + } ++#else ++#define IX_OSAL_OS_ASSERT(c) if(!(c)) \ ++ { \ ++ BUG(); \ ++ } ++#endif + + /* + * Place holder. |