mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
Merge branch 'master' of git://git.denx.de/u-boot-ubi
This commit is contained in:
commit
4c24dab391
2 changed files with 12 additions and 2 deletions
|
@ -18,6 +18,7 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
|
|||
|
||||
#include <hexdump.h>
|
||||
|
||||
#ifndef __UBOOT__
|
||||
#define ubi_assert(expr) do { \
|
||||
if (unlikely(!(expr))) { \
|
||||
pr_crit("UBI assert failed in %s at %u (pid %d)\n", \
|
||||
|
@ -25,6 +26,15 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
|
|||
dump_stack(); \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
#define ubi_assert(expr) do { \
|
||||
if (unlikely(!(expr))) { \
|
||||
pr_debug("UBI assert failed in %s at %u\n", \
|
||||
__func__, __LINE__); \
|
||||
dump_stack(); \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define ubi_dbg_print_hex_dump(ps, pt, r, g, b, len, a) \
|
||||
print_hex_dump(ps, pt, r, g, b, len, a)
|
||||
|
|
|
@ -167,7 +167,7 @@ struct ubifs_global_debug_info {
|
|||
#else
|
||||
#define ubifs_assert(expr) do { \
|
||||
if (unlikely(!(expr))) { \
|
||||
pr_crit("UBIFS assert failed in %s at %u\n", \
|
||||
pr_debug("UBIFS assert failed in %s at %u\n", \
|
||||
__func__, __LINE__); \
|
||||
dump_stack(); \
|
||||
} \
|
||||
|
@ -176,7 +176,7 @@ struct ubifs_global_debug_info {
|
|||
#define ubifs_assert_cmt_locked(c) do { \
|
||||
if (unlikely(down_write_trylock(&(c)->commit_sem))) { \
|
||||
up_write(&(c)->commit_sem); \
|
||||
pr_crit("commit lock is not locked!\n"); \
|
||||
pr_debug("commit lock is not locked!\n"); \
|
||||
ubifs_assert(0); \
|
||||
} \
|
||||
} while (0)
|
||||
|
|
Loading…
Reference in a new issue