2 * BK Id: SCCS/s.subr_prf.c 1.10 12/27/01 10:38:52 trini
5 * Written by Cort Dougan to replace the version originally used
6 * by Paul Mackerras, which came from NetBSD and thus had copyright
7 * conflicts with Linux.
9 * This file makes liberal use of the standard linux utility
10 * routines to reduce the size of the binary. We assume we can
11 * trust some parts of Linux inside the debugger.
12 * -- Cort (cort@cs.nmt.edu)
14 * Copyright (C) 1999 Cort Dougan.
17 #include <linux/kernel.h>
18 #include <linux/string.h>
22 extern int xmon_write(void *, void *, int);
25 xmon_vfprintf(void *f, const char *fmt, va_list ap)
27 static char xmon_buf[2048];
30 n = vsprintf(xmon_buf, fmt, ap);
31 xmon_write(f, xmon_buf, n);
35 xmon_printf(const char *fmt, ...)
40 xmon_vfprintf(stdout, fmt, ap);
45 xmon_fprintf(void *f, const char *fmt, ...)
50 xmon_vfprintf(f, fmt, ap);
57 xmon_write(stdout, s, strlen(s));