File indexing completed on 2025-05-11 08:24:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef __LINUX_RTEMS_IMPL_H__
0012 #define __LINUX_RTEMS_IMPL_H__
0013
0014 #include <rtems.h>
0015 #include <rtems/bspIo.h>
0016
0017 static inline char *do_kmemdup(const char *s, size_t n)
0018 {
0019 char *dup = malloc(n + 1);
0020
0021 if (dup != 0) {
0022 dup[n] = '\0';
0023 dup = memcpy(dup, s, n);
0024 }
0025
0026 return dup;
0027 }
0028
0029
0030
0031
0032 static inline int jffs2_printk(const char* fmt, ...)
0033 {
0034 va_list ap;
0035 int r;
0036 va_start(ap, fmt);
0037 r = vprintk(fmt, ap);
0038 va_end(ap);
0039 return r;
0040 }
0041
0042 #undef printk
0043 #define printk jffs2_printk
0044
0045 #endif