mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 16:02:57 +00:00
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Enrico Weigelt <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
33 lines
663 B
C
33 lines
663 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright (C) 2011 Richard Weinberger <[email protected]>
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/console.h>
|
|
#include <linux/init.h>
|
|
#include <os.h>
|
|
|
|
static void early_console_write(struct console *con, const char *s, unsigned int n)
|
|
{
|
|
um_early_printk(s, n);
|
|
}
|
|
|
|
static struct console early_console_dev = {
|
|
.name = "earlycon",
|
|
.write = early_console_write,
|
|
.flags = CON_BOOT,
|
|
.index = -1,
|
|
};
|
|
|
|
static int __init setup_early_printk(char *buf)
|
|
{
|
|
if (!early_console) {
|
|
early_console = &early_console_dev;
|
|
register_console(&early_console_dev);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
early_param("earlyprintk", setup_early_printk);
|