Subject: kern/35382: Linux emulation TERMIOS support for TIOCMBIC and TIOCMBIS missing
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Wolfgang Stukenbrock <Wolfgang.Stukenbrock@nagler-company.com>
List: netbsd-bugs
Date: 01/08/2007 16:05:10
>Number:         35382
>Category:       kern
>Synopsis:       Linux emulation TERMIOS support for TIOCMBIC and TIOCMBIS missing
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 08 16:05:10 +0000 2007
>Originator:     Wolfgang Stukenbrock
>Release:        NetBSD 3.1
>Organization:
Dr. Nagler & Company GmbH
>Environment:
	
	
System: NetBSD s012 2.1 NetBSD 2.1 (NSW-S012) #10: Mon Dec 12 12:03:54 CET 2005 wgstuken@s011:/export/netbsd-2.1/usr/src/sys/arch/i386/compile/NSW-S012 i386
Architecture: i386
Machine: i386
>Description:
	The Linux emulation for i386 has support for TIOCMGET and TIOCMSET, but the two additional
        calls TIOCMBIC and TIOCMBIS are missing.
	Both calls share the same bit-mask arguments, the implemented functions get or set the bitmask,
	the two missing one modify the existing bitmask by setting or clearing additional bits.
	Linux-binaries that uses the missing ioctl-calls fails to run. (e.g. the upsmon software from the GENEREX GmbH.)

	remark: the system I'm just typing the problem report is still on 2.1, but the problem is in 3.1 too
>How-To-Repeat:
	Try to run a program that needs the missing calls.
>Fix:
	Just add the following stubs to linux_termios.c

*** /export/NetBSD-3.1/src/sys/compat/linux/common/linux_termios.c Sun Feb 27 00:10:19 2005
--- linux_termios.c     Mon Feb 27 11:13:58 2006
***************
*** 712,717 ****
--- 712,723 ----
        case LINUX_TIOCMSET:
                SCARG(&ia, com) = TIOCMSET;
                break;
+       case LINUX_TIOCMBIC:
+               SCARG(&ia, com) = TIOCMBIC;
+               break;
+       case LINUX_TIOCMBIS:
+               SCARG(&ia, com) = TIOCMBIS;
+               break;
  #ifdef LINUX_TIOCGPTN
        case LINUX_TIOCGPTN:
  #ifndef NO_DEV_PTM

>Unformatted: