LCOV - code coverage report
Current view: top level - arch/um/kernel - early_printk.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 8 0.0 %
Date: 2023-08-24 13:40:31 Functions: 0 2 0.0 %

          Line data    Source code
       1             : // SPDX-License-Identifier: GPL-2.0-only
       2             : /*
       3             :  * Copyright (C) 2011 Richard Weinberger <richrd@nod.at>
       4             :  */
       5             : 
       6             : #include <linux/kernel.h>
       7             : #include <linux/console.h>
       8             : #include <linux/init.h>
       9             : #include <os.h>
      10             : 
      11           0 : static void early_console_write(struct console *con, const char *s, unsigned int n)
      12             : {
      13           0 :         um_early_printk(s, n);
      14           0 : }
      15             : 
      16             : static struct console early_console_dev = {
      17             :         .name = "earlycon",
      18             :         .write = early_console_write,
      19             :         .flags = CON_BOOT,
      20             :         .index = -1,
      21             : };
      22             : 
      23           0 : static int __init setup_early_printk(char *buf)
      24             : {
      25           0 :         if (!early_console) {
      26           0 :                 early_console = &early_console_dev;
      27           0 :                 register_console(&early_console_dev);
      28             :         }
      29           0 :         return 0;
      30             : }
      31             : 
      32             : early_param("earlyprintk", setup_early_printk);

Generated by: LCOV version 1.14