aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/xmon/subr_prf.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/ppc/xmon/subr_prf.c
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/ppc/xmon/subr_prf.c')
-rw-r--r--arch/ppc/xmon/subr_prf.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/ppc/xmon/subr_prf.c b/arch/ppc/xmon/subr_prf.c
new file mode 100644
index 00000000000..126624f3f2e
--- /dev/null
+++ b/arch/ppc/xmon/subr_prf.c
@@ -0,0 +1,55 @@
1/*
2 * Written by Cort Dougan to replace the version originally used
3 * by Paul Mackerras, which came from NetBSD and thus had copyright
4 * conflicts with Linux.
5 *
6 * This file makes liberal use of the standard linux utility
7 * routines to reduce the size of the binary. We assume we can
8 * trust some parts of Linux inside the debugger.
9 * -- Cort (cort@cs.nmt.edu)
10 *
11 * Copyright (C) 1999 Cort Dougan.
12 */
13
14#include <linux/kernel.h>
15#include <linux/string.h>
16#include <stdarg.h>
17#include "nonstdio.h"
18
19extern int xmon_write(void *, void *, int);
20
21void
22xmon_vfprintf(void *f, const char *fmt, va_list ap)
23{
24 static char xmon_buf[2048];
25 int n;
26
27 n = vsprintf(xmon_buf, fmt, ap);
28 xmon_write(f, xmon_buf, n);
29}
30
31void
32xmon_printf(const char *fmt, ...)
33{
34 va_list ap;
35
36 va_start(ap, fmt);
37 xmon_vfprintf(stdout, fmt, ap);
38 va_end(ap);
39}
40
41void
42xmon_fprintf(void *f, const char *fmt, ...)
43{
44 va_list ap;
45
46 va_start(ap, fmt);
47 xmon_vfprintf(f, fmt, ap);
48 va_end(ap);
49}
50
51void
52xmon_puts(char *s)
53{
54 xmon_write(stdout, s, strlen(s));
55}