X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yportenv.h;h=8b80c6d6889a6390eb41debb33345cce33b4b0b6;hp=de7f38ea4c4742590ca6076f4511cd7d57660aee;hb=e721e0888655c325e5d5477ae121ff325f2847c0;hpb=b0b91352fff81d01d34fd562629ce199c255cdd6 diff --git a/yportenv.h b/yportenv.h index de7f38e..8b80c6d 100644 --- a/yportenv.h +++ b/yportenv.h @@ -32,6 +32,7 @@ #endif #include #include +#include #include #include #include @@ -79,6 +80,14 @@ #define TSTR(x) KERN_WARNING x #define TOUT(p) printk p +#define yaffs_trace(mask, fmt, args...) \ + do { if ((mask) & (yaffs_traceMask|YAFFS_TRACE_ERROR)) \ + printk(KERN_WARNING "yaffs: " fmt, ## args); \ + } while (0) + +#define compile_time_assertion(assertion) \ + ({ int x = __builtin_choose_expr(assertion, 0, (void)0); (void) x; }) + #elif defined CONFIG_YAFFS_DIRECT /* Direct interface */ @@ -133,7 +142,9 @@ #endif -extern unsigned yaffs_traceMask; +/* see yaffs_fs.c */ +extern unsigned int yaffs_traceMask; +extern unsigned int yaffs_wr_attempts; /* * Tracing flags.