• Petr Mladek's avatar
    printk/console: Clean up boot console handling in register_console() · 5e8ba485
    Petr Mladek authored
    The variable @bcon has two meanings. It is used several times for iterating
    the list of registered consoles. In the meantime, it holds the information
    whether a boot console is first in @console_drivers list.
    
    The information about the 1st console driver used to be important for
    the decision whether to install the new console by default or not.
    It allowed to re-evaluate the variable @need_default_console when
    a real console with tty binding has been unregistered in the meantime.
    
    The decision about the default console is not longer affected by @bcon
    variable. The current code checks whether the first driver is real
    and has tty binding directly.
    
    The information about the first console is still used for two more
    decisions:
    
      1. It prevents duplicate output on non-boot consoles with
         CON_CONSDEV flag set.
    
      2. Early/boot consoles are unregistered when a real console with
         CON_CONSDEV is registered and @keep_bootcon is not set.
    
    T...
    5e8ba485
printk.c 94.2 KB