DragonFly BSD
DragonFly submit List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

/usr/src/etc/rc.d/moused patch reloaded


From: Sascha Wildner <saw@xxxxxxxxx>
Date: Thu, 29 Apr 2004 18:46:10 +0200

Hello implementors,

please review and commit the attached patch that (finally) fixes all moused issues reported by walt (i.e. silence vidcontrol's nitpicking error messages). See the recent threads in dragonfly.bugs and dragonfly.submit.

----
Add viddev definition for serial console support.

In moused_start run vidcontrol only once instead of (number of /dev/ttyv* minus 1) times.

Add moused_stop routine to kill the mouse daemon and turn off the mouse pointer when the 'stop' argument is specified.
----


Regards,
Sascha

--
http://yoyodyne.ath.cx
*** /usr/src/etc/rc.d/moused	Wed Apr 28 19:18:51 2004
--- /usr/s/src/etc/rc.d/moused	Wed Apr 28 19:21:33 2004
***************
*** 15,20 ****
--- 15,26 ----
  rcvar=`set_rcvar`
  command="/usr/sbin/${name}"
  start_cmd="moused_start"
+ stop_cmd="moused_stop"
+ sig_stop="-INT"
+ 
+ # stdin must be redirected because it might be for a serial console
+ #
+ viddev=/dev/ttyv0
  
  moused_start()
  {
***************
*** 31,41 ****
  		;;
  	esac
  
! 	for ttyv in /dev/ttyv* ; do
! 		vidcontrol < ${ttyv} ${_mousechar_arg} -m on
! 	done
  	echo '.'
  }
  
  load_rc_config $name
  run_rc_command "$1"
--- 37,58 ----
  		;;
  	esac
  
! 	vidcontrol < ${viddev} ${_mousechar_arg} -m on
! 
  	echo '.'
  }
  
+ moused_stop()
+ {
+ 	pids="`check_process $command`"
+ 	if [ -n "$pids" ]; then
+ 		for pid in $pids; do
+ 			kill $sig_stop $pid
+ 		done
+ 	fi
+ 
+ 	vidcontrol < ${viddev} -m off
+ }
+ 
  load_rc_config $name
  run_rc_command "$1"


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]