Skip to content
  • Peter Hurley's avatar
    tty,serial: Unify UPF_* and ASYNC_* flag definitions · 904326ec
    Peter Hurley authored
    
    
    The userspace-defined ASYNC_* flags in include/uapi/linux/tty_flags.h
    are the authoritative bit definitions for the serial_struct flags,
    and thus for any derivative values or fields.
    
    Although the serial core provides the TIOCSSERIAL and TIOCGSERIAL
    ioctls to set and retrieve these flags from userspace, it defines these
    bits independently, as UPF_* macros.
    
    Define the UPF_* macros which are userspace-modifiable directly from
    the ASYNC_* symbolic constants. Add compile-time test to ensure the
    bits changeable by TIOCSSERIAL match the defined range in the uapi
    header.
    
    Add ASYNCB_MAGIC_MULTIPLIER to the uapi header since this bit is
    programmable by userspace.
    
    Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    904326ec