aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorAndrew Cooper <andrew.cooper3@citrix.com>2012-11-30 09:37:13 +0000
committerAndrew Cooper <andrew.cooper3@citrix.com>2012-11-30 09:37:13 +0000
commit6736a3571707bf103315f8749a5cf349122deb16 (patch)
treea58f8488b83eaf4729e63a498f0e14b9120cb7cc /extras
parent5088edf797252b470d1e74f9125fae29fc026911 (diff)
downloadxen-6736a3571707bf103315f8749a5cf349122deb16.tar.gz
xen-6736a3571707bf103315f8749a5cf349122deb16.tar.bz2
xen-6736a3571707bf103315f8749a5cf349122deb16.zip
minios/console: console_input() weak reference
In exactly the same style as app_main() in kernel.c, create a weak reference console_input() function for applications to override to quickly gain access to the console. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'extras')
-rw-r--r--extras/mini-os/console/console.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/extras/mini-os/console/console.c b/extras/mini-os/console/console.c
index fec3791c20..380f53ca17 100644
--- a/extras/mini-os/console/console.c
+++ b/extras/mini-os/console/console.c
@@ -54,9 +54,7 @@
NOTE: you need to enable verbose in xen/Rules.mk for it to work. */
static int console_initialised = 0;
-
-#ifndef HAVE_LIBC
-void xencons_rx(char *buf, unsigned len, struct pt_regs *regs)
+__attribute__((weak)) void console_input(char * buf, unsigned len)
{
if(len > 0)
{
@@ -69,6 +67,12 @@ void xencons_rx(char *buf, unsigned len, struct pt_regs *regs)
}
}
+#ifndef HAVE_LIBC
+void xencons_rx(char *buf, unsigned len, struct pt_regs *regs)
+{
+ console_input(buf, len);
+}
+
void xencons_tx(void)
{
/* Do nothing, handled by _rx */