• P
    tty,serial: Unify UPF_* and ASYNC_* flag definitions · 904326ec
    Peter Hurley 提交于
    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: NPeter Hurley <peter@hurleysoftware.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    904326ec
serial_core.h 14.0 KB