Subject: misc/31905: Termios ioctls TIOCMBIC and TIOCMBIS missing in emulation code
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Wolfgang Stukenbrock <wgstuken@s012.nagler-company.com>
List: netbsd-bugs
Date: 10/24/2005 11:18:00
>Number:         31905
>Category:       misc
>Synopsis:       Termios ioctls TIOCMBIC and TIOCMBIS missing in emulation code
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 24 11:18:00 +0000 2005
>Originator:     Wolfgang Stukenbrock
>Release:        NetBSD 2.0.2
>Organization:
Dr. Nagler & Company GmbH
>Environment:
        
        
System: NetBSD wst 2.0.2 NetBSD 2.0.2 (NSW-srv-ASUS-scsi) #17: Thu Sep 15 18:19:
54 CEST 2005 wgstuken@s012:/export/netbsd-2.0.2/usr/src/sys/arch/i386/compile/NS
W-srv-ASUS-scsi i386
Architecture: i386
Machine: i386
>Description:
        The Ioctl's TIOCMGET and TIOCMSET are mapped from the linux version to t
he NetBSD-Version
        but the two bitmanipulation calls TIOCMBIC and TIOCMBIS are missing.

        The problem has been located when running the UPS management software fo
r an OP2003
        of ERREPI. When added TIOCMBIC and TIOCMBIS to the emulation, the softwa
re runs fine.
       
>How-To-Repeat:
        Run a Linux-Programm that will use theese calls. It will fail.
>Fix:
        add the missing IOCTL transformation to usr/src/sys/compat/linux/common/
linux_termios.c

diff -c -r1.1 linux_termios.c
*** linux_termios.c     2005/10/24 09:35:19     1.1
--- linux_termios.c     2005/10/24 09:36:01
***************
*** 708,713 ****
--- 708,719 ----
        case LINUX_TIOCMSET:
                SCARG(&ia, com) = TIOCMSET;
                break;
+       case LINUX_TIOCMBIC:
+               SCARG(&ia, com) = TIOCMBIC;
+               break;
+       case LINUX_TIOCMBIS:
+               SCARG(&ia, com) = TIOCMBIS;
+               break;
        default:
                error = EINVAL;
                goto out;