[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] minios/console: console_input() weak reference


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 04 Dec 2012 00:22:19 +0000
  • Delivery-date: Tue, 04 Dec 2012 00:22:25 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1354268233 0
# Node ID 69ff13e8c17df1789ed0049a86fbfb6aff11a041
# Parent  07396f4fb4766df322f1cafc1175ecab22c6f4af
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@xxxxxxxxxx>
Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 07396f4fb476 -r 69ff13e8c17d extras/mini-os/console/console.c
--- a/extras/mini-os/console/console.c  Fri Nov 30 09:32:27 2012 +0000
+++ b/extras/mini-os/console/console.c  Fri Nov 30 09:37:13 2012 +0000
@@ -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,
     }
 }
 
+#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 */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.