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

看板DFBSD_submit作者時間21年前 (2004/04/30 10:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
This is a multi-part message in MIME format. --------------020403010506080707010301 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 --------------020403010506080707010301 Content-Type: text/plain; name="patch.moused" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch.moused" *** /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" --------------020403010506080707010301--
文章代碼(AID): #10aREA00 (DFBSD_submit)
文章代碼(AID): #10aREA00 (DFBSD_submit)