• Vincent Whitchurch's avatar
    tty: Add NULL TTY driver · 3117ff13
    Vincent Whitchurch authored
    If no console driver is enabled (or if a non-present driver is selected
    with something like console=null in an attempt to disable the console),
    opening /dev/console errors out, and init scripts and other userspace
    code that relies on the existence of a console will fail.  Symlinking
    /dev/null to /dev/console does not solve the problem since /dev/null
    does not behave like a real TTY.
    
    To just provide a dummy console to userspace when no console driver is
    available or desired, add a ttynull driver which simply discards all
    writes.  It can be chosen on the command line in the standard way, i.e.
    with console=ttynull.
    Signed-off-by: default avatarVincent Whitchurch <vincent.whitchurch@axis.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    3117ff13
ttynull.c 2.31 KB