[PATCH 2/4] console: expose consoles in devfs
Sascha Hauer
s.hauer at pengutronix.de
Mon Feb 27 01:55:48 PST 2017
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 at pengutronix.de>
> ---
> 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 |
More information about the barebox
mailing list