diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2008-11-18 15:02:19 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-03-16 14:10:41 -0400 |
commit | 37b0b65f6362269a4cb86ed8be1c0ac8caa497f8 (patch) | |
tree | f128d81fdedf7cff06aee474cb7b7d9b6c9c5953 /arch/m68k/emu/natfeat.c | |
parent | b2edd2fd9b10c0cfc5a305eaf91587e6142b08f9 (diff) |
m68k/atari: ARAnyM - Add support for console access
[geert: Cleanups and updates]
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Petr Stehlik <pstehlik@sophics.cz>
Diffstat (limited to 'arch/m68k/emu/natfeat.c')
-rw-r--r-- | arch/m68k/emu/natfeat.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/arch/m68k/emu/natfeat.c b/arch/m68k/emu/natfeat.c index 987d77322178..2291a7d69d49 100644 --- a/arch/m68k/emu/natfeat.c +++ b/arch/m68k/emu/natfeat.c | |||
@@ -35,24 +35,6 @@ asm("\n" | |||
35 | EXPORT_SYMBOL_GPL(nf_get_id); | 35 | EXPORT_SYMBOL_GPL(nf_get_id); |
36 | EXPORT_SYMBOL_GPL(nf_call); | 36 | EXPORT_SYMBOL_GPL(nf_call); |
37 | 37 | ||
38 | static int stderr_id; | ||
39 | |||
40 | static void nf_write(struct console *co, const char *str, unsigned int count) | ||
41 | { | ||
42 | char buf[68]; | ||
43 | |||
44 | buf[64] = 0; | ||
45 | while (count > 64) { | ||
46 | memcpy(buf, str, 64); | ||
47 | nf_call(stderr_id, buf); | ||
48 | str += 64; | ||
49 | count -= 64; | ||
50 | } | ||
51 | memcpy(buf, str, count); | ||
52 | buf[count] = 0; | ||
53 | nf_call(stderr_id, buf); | ||
54 | } | ||
55 | |||
56 | void nfprint(const char *fmt, ...) | 38 | void nfprint(const char *fmt, ...) |
57 | { | 39 | { |
58 | static char buf[256]; | 40 | static char buf[256]; |
@@ -65,26 +47,6 @@ void nfprint(const char *fmt, ...) | |||
65 | va_end(ap); | 47 | va_end(ap); |
66 | } | 48 | } |
67 | 49 | ||
68 | static struct console nf_console_driver = { | ||
69 | .name = "debug", | ||
70 | .write = nf_write, | ||
71 | .flags = CON_PRINTBUFFER, | ||
72 | .index = -1, | ||
73 | }; | ||
74 | |||
75 | static int __init nf_debug_setup(char *arg) | ||
76 | { | ||
77 | if (strcmp(arg, "emu")) | ||
78 | return 0; | ||
79 | |||
80 | stderr_id = nf_get_id("NF_STDERR"); | ||
81 | if (stderr_id) | ||
82 | register_console(&nf_console_driver); | ||
83 | return 0; | ||
84 | } | ||
85 | |||
86 | early_param("debug", nf_debug_setup); | ||
87 | |||
88 | static void nf_poweroff(void) | 50 | static void nf_poweroff(void) |
89 | { | 51 | { |
90 | long id = nf_get_id("NF_SHUTDOWN"); | 52 | long id = nf_get_id("NF_SHUTDOWN"); |