pre-2.3.4..
[davej-history.git] / arch / ppc / xmon / subr_prf.c
blob263538f945e9bc260a3a1c48080f5b5a0f3e223a
1 /*
2 * Written by Cort Dougan to replace the version written by
3 * Paul Mackerras that had copyright conflicts with Linux.
5 * This file makes liberal use of the standard linux utility
6 * routines to reduce the size of the binary. We assume we can
7 * trust some parts of Linux inside the debugger.
8 * -- Cort (cort@cs.nmt.edu)
10 * Copyright (C) 1999 Cort Dougan.
13 #include <linux/kernel.h>
14 #include <linux/string.h>
15 #include <stdarg.h>
16 #include "nonstdio.h"
18 extern int xmon_write(void *, void *, int);
20 void
21 xmon_vfprintf(void *f, const char *fmt, va_list ap)
23 char buf[2048];
24 vsprintf( buf, fmt, ap );
25 xmon_write( f, buf, strlen(buf) );
28 void
29 xmon_printf(const char *fmt, ...)
31 va_list ap;
33 va_start(ap, fmt);
34 xmon_vfprintf(stdout, fmt, ap);
35 va_end(ap);
38 void
39 xmon_fprintf(void *f, const char *fmt, ...)
41 va_list ap;
43 va_start(ap, fmt);
44 xmon_vfprintf(f, fmt, ap);
45 va_end(ap);