1 #include <linux/list.h>
3 #include <linux/slab.h>
4 #include <linux/vmalloc.h>
6 #include "intermezzo_fs.h"
7 #include "intermezzo_kml.h"
10 // dlogit -- oppsite to logit ()
11 // return the sbuf + size;
12 char *dlogit (void *tbuf, const void *sbuf, int size)
14 char *ptr = (char *)sbuf;
15 memcpy(tbuf, ptr, size);
20 static spinlock_t kml_lock = SPIN_LOCK_UNLOCKED;
21 static char buf[1024];
22 char * bdup_printf (char *format, ...)
29 spin_lock_irqsave(&kml_lock, flags);
30 va_start(args, format);
31 i = vsprintf(buf, format, args); /* hopefully i < sizeof(buf) */
34 PRESTO_ALLOC (path, char *, i + 1);
39 spin_unlock_irqrestore(&kml_lock, flags);