X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yportenv.h;h=e5e3dbe8e245326d794592c68e7fc8bea1be9b00;hp=de7f38ea4c4742590ca6076f4511cd7d57660aee;hb=e39518410bfa410b09e4b270755f756b91456001;hpb=749436878923f8c152c98cc016f32c0562479182 diff --git a/yportenv.h b/yportenv.h index de7f38e..e5e3dbe 100644 --- a/yportenv.h +++ b/yportenv.h @@ -79,6 +79,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 +141,9 @@ #endif -extern unsigned yaffs_traceMask; +/* see yaffs_fs.c */ +extern unsigned int yaffs_traceMask; +extern unsigned int yaffs_wr_attempts; /* * Tracing flags.