diff options
Diffstat (limited to 'cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h')
-rw-r--r-- | cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h b/cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h index ff53e63281..08520342f5 100644 --- a/cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h +++ b/cpukit/libfs/src/jffs2/include/linux/kernel-rtems.h @@ -7,6 +7,8 @@ * Germany * <rtems@embedded-brains.de> * + * Copyright 2016 Chris Johns <chrisj@rtems.org> + * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.org/license/LICENSE. @@ -15,6 +17,9 @@ #ifndef __LINUX_RTEMS_IMPL_H__ #define __LINUX_RTEMS_IMPL_H__ +#include <rtems.h> +#include <rtems/print.h> + static inline char *do_kmemdup(const char *s, size_t n) { char *dup = malloc(n + 1); @@ -27,4 +32,20 @@ static inline char *do_kmemdup(const char *s, size_t n) return dup; } +/* + * Provide a private printk to avoid all the formatting warnings in the JFFS2 code. + */ +static inline int jffs2_printk(const char* fmt, ...) +{ + va_list ap; + int r; + va_start(ap, fmt); + r = vprintk(fmt, ap); + va_end(ap); + return r; +} + +#undef printk +#define printk jffs2_printk + #endif /* __LINUX_RTEMS_IMPL_H__ */ |