summaryrefslogtreecommitdiffstats
path: root/runtime/user/emul.h
blob: 3086a66619ae19e89e2e1fda89f35464c44841f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
{
	int i;
	i=vsnprintf(buf,size,fmt,args);
	return (i >= size) ? (size - 1) : i;
}

#define _stp_log printf

#undef smp_processor_id
#define smp_processor_id(x) 0

#include <stdarg.h>
unsigned long strtoul(const char *nptr, char **endptr, int base);
#define simple_strtoul strtoul

#define KALLSYMS_LOOKUP kallsyms_lookup

const char *kallsyms_lookup (unsigned long addr,
			     unsigned long *symbolsize,
			     unsigned long *offset,
			     char **modname, 
			     char *namebuf)
{
  static char buf[32];
  sprintf (namebuf, "foobar");
  sprintf (buf, "foobar_mod");
  *offset = 1;
  modname = (char **)&buf;
  return namebuf;
}