From nobody Mon Sep 22 18:16:38 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVrzt4C0rz68Ftr; Mon, 22 Sep 2025 18:22:02 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVrzt1ysVz3wyR; Mon, 22 Sep 2025 18:22:02 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id 0ajIvGP9oPzKy0lAnvMd6e; Mon, 22 Sep 2025 18:22:01 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id 0lAlvEJzwJhBP0lAmvYE0n; Mon, 22 Sep 2025 18:22:01 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=68d193c9 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=yJojWOMRYYMA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=_jZRaqlFIkvtVTtRhTwA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 1C6171CB8; Mon, 22 Sep 2025 11:21:59 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 5C842A0; Mon, 22 Sep 2025 11:16:38 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Vladimir Kondratyev cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: a4417b9f9cde - stable/15 - moused(8): Start moused with devd In-reply-to: <202509220923.58M9NUsR099992@gitrepo.freebsd.org> References: <202509220923.58M9NUsR099992@gitrepo.freebsd.org> Comments: In-reply-to Vladimir Kondratyev message dated "Mon, 22 Sep 2025 09:23:30 +0000." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 22 Sep 2025 11:16:38 -0700 Message-Id: <20250922181638.5C842A0@slippy.cwsent.com> X-CMAE-Envelope: MS4xfH/+4+SxivJiEbOQOitjCY8RNq7QyW3BqVz8am6GohSWMgAMX1AaX4IUQHbAVX2ugr8Slih8WIbATBRDTEPDemRzn+SaXHbxRsKvHd0iX6U3l0fLAdhg jAQDwdkjs0zmeK0G+8dptkL1TpFECuHbapgXcjd+/KPoxAFFUaYSn/VVAb28fM5nlK8ZpOmMGlatiYGy2B9WTWnLU6qVGWLKjJqPp0P/NRiuVD8l4Qy9GPBZ Ip8Yfz6GiKgGw8nfgLReAzN+taMh1wQ0AeodqLlBJRQKGTStTmHVL8b4TThZ18QlnIRXVJRLVrJXxaow+As7Swv3nCEUmkryO6yU9wbt7ms= X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cVrzt1ysVz3wyR In message <202509220923.58M9NUsR099992@gitrepo.freebsd.org>, Vladimir Kondraty ev writes: > The branch stable/15 has been updated by wulf: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a4417b9f9cde5ab1ca1ff84da4847bd7 > d5141c29 > > commit a4417b9f9cde5ab1ca1ff84da4847bd7d5141c29 > Author: Vladimir Kondratyev > AuthorDate: 2025-09-21 13:14:49 +0000 > Commit: Vladimir Kondratyev > CommitDate: 2025-09-22 09:22:24 +0000 > > moused(8): Start moused with devd > > It is appeared that currently starting of moused does not depend on > moused_enable variable value in rc.conf. That leads to missing USB mice > support in default configuration. Start moused in traditional per > device mode with devd to follow POLA. > > One daemon per system mode still can be enabled with setting of > moused_port="auto" > moused_nondefault_enable="NO" > variables in /etc/rc.conf > > To revert to sysmouse mode add moused_type="sysmouse" to /etc/rc.conf > > Reported by: many > Requested by: glebius > Reviewed by: glebius > MFC after: 1 day > Differential Revision: https://reviews.freebsd.org/D52430 > > (cherry picked from commit 66e7f048f0c8e9e726738fadd9dc819bfda3cbfe) > --- > libexec/rc/rc.conf | 4 ++-- > libexec/rc/rc.d/moused | 11 ++++++----- > sbin/devd/moused.conf | 9 +++++++++ > 3 files changed, 17 insertions(+), 7 deletions(-) > > diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf > index 2506bd45a53f..7525f7c9d1fc 100644 > --- a/libexec/rc/rc.conf > +++ b/libexec/rc/rc.conf > @@ -586,11 +586,11 @@ font8x14="NO" # font 8x14 from /usr/share/{sy > scons,vt}/fonts/* (or NO). > font8x8="NO" # font 8x8 from /usr/share/{syscons,vt}/fonts/* (or NO) > . > blanktime="300" # blank time (in seconds) or "NO" to turn it of > f. > saver="NO" # screen saver: Uses /boot/kernel/${saver}_saver.ko > -moused_nondefault_enable="NO" # Treat non-default mice as enabled unless > +moused_nondefault_enable="YES" # Treat non-default mice as enabled unless > # specifically overridden in rc.conf(5). > moused_enable="NO" # Run the mouse daemon. > moused_type="evdev" # See man page for rc.conf(5) for available settings. > -moused_port="auto" # Set to your mouse port. > +moused_port="/dev/psm0" # Set to your mouse port. > moused_flags="" # Any additional flags to moused. > mousechar_start="NO" # if 0xd0-0xd3 default range is occupied in your > # language code table, specify alternative range > diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused > index 64e4f815eea9..35a26bd57275 100755 > --- a/libexec/rc/rc.d/moused > +++ b/libexec/rc/rc.d/moused > @@ -28,9 +28,10 @@ moused_svcj="NO" > # expected to be the mouse device. > # > if [ -n "$2" ]; then > - eval moused_$2_enable=\${moused_$2_enable-${moused_nondefault_enable}} > - rcvar="moused_${2}_enable" > - pidfile="${pidprefix}.$2.pid" > + ms=`basename $2` > + eval moused_${ms}_enable=\${moused_${ms}_enable-${moused_nondefault_ena > ble}} > + rcvar="moused_${ms}_enable" > + pidfile="${pidprefix}.${ms}.pid" > pidarg="-I $pidfile" > fi > > @@ -45,10 +46,10 @@ moused_start() > # the moused_port variable, which if not defined sets it to the > # passed in device name. > # > - ms=$1 > + ms=`basename $1` This is misplaced resulting in, usage: basename string [suffix] basename [-a] [-s suffix] string [...] > if [ -n "$ms" ]; then This should be $1. > eval myflags=\${moused_${ms}_flags-$moused_flags} > - eval myport=\${moused_${ms}_port-/dev/$ms} > + eval myport=\${moused_${ms}_port-/dev/$1} > eval mytype=\${moused_${ms}_type-$moused_type} > if [ -n "$mytype" ] && check_kern_features evdev_support; then > typearg="-t ${mytype}" > diff --git a/sbin/devd/moused.conf b/sbin/devd/moused.conf > index ed1060ffdf2e..8821c2bb8375 100644 > --- a/sbin/devd/moused.conf > +++ b/sbin/devd/moused.conf > @@ -33,3 +33,12 @@ notify 100 { > > action "service moused quietstop $cdev"; > }; > + > +notify 100 { > + match "system" "DEVFS"; > + match "subsystem" "CDEV"; > + match "type" "CREATE"; > + match "cdev" "input/event[0-9]+"; > + > + action "service moused quietstart $cdev"; > +}; > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0