Re: [PATCH 2/4] console: expose consoles in devfs

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

 



On Fri, Feb 24, 2017 at 03:24:59PM +0100, Bastian Stender wrote:
> This enables displaying text on e.g. a framebuffer console by issueing
> 
> 	echo -o /dev/fbconsole0 abc123
> 
> Signed-off-by: Bastian Stender <bst@xxxxxxxxxxxxxx>
> ---
>  common/console.c  | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  include/console.h |  3 +++
>  2 files changed, 55 insertions(+)
> 
> diff --git a/common/console.c b/common/console.c
> index 43890b3da8..dcd67afe20 100644
> --- a/common/console.c
> +++ b/common/console.c
> @@ -243,6 +243,39 @@ static int __console_puts(struct console_device *cdev, const char *s)
>  	return n;
>  }
>  
> +static int fops_open(struct cdev *cdev, unsigned long flags)
> +{
> +	struct console_device *priv = cdev->priv;
> +
> +	return priv->open(priv);
> +}

You do not check if this hook exists in the driver, but this will be
solved when you follow what I suggested in 1/4.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux