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

Re: [Xen-devel] [PATCH 2 of 4] minios/console: console_input() weak reference



Andrew Cooper, le Mon 26 Nov 2012 16:24:10 +0000, a écrit :
> 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>

> diff -r 505992114832 -r 29138c27eb72 extras/mini-os/console/console.c
> --- 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,
>      }
>  }
>  
> +#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-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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