• Antonino A. Daplas's avatar
    [PATCH] VT binding: Add sysfs control to the VT layer · 6db4063c
    Antonino A. Daplas authored
    Add sysfs control to the VT layer.  A new sysfs class, 'vtconsole', and class
    devices 'vtcon[n]' are added.  Each class device file has the following
    attributes:
    
    /sys/class/vtconsole/vtcon[n]/name - read-only attribute showing the
                                         name of the current backend
    
    /sys/class/vtconsole/vtcon[n]/bind - read/write attribute
                 where: 0 - backend is unbound/unbind backend from the VT layer
                        1 - backend is bound/bind backend to the VT layer
    
    In addition, if any of the consoles are in KD_GRAPHICS mode, binding and
    unbinding will not succeed.  KD_GRAPHICS mode usually indicates that the
    underlying console hardware is used for other purposes other than displaying
    text (ie X).  This feature should prevent binding/unbinding from interfering
    with a graphics application using the VT.
    
    [akpm@osdl.org: warning fixes]
    Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
    Cc: Greg KH <greg@kroah.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    6db4063c
vt.c 89 KB