Subject: bin/22581: some properties in selection mode of wsmoused.conf should be in the global scope
To: None <gnats-bugs@gnats.netbsd.org>
From: Ryo HAYASAKA <ryoh@jaist.ac.jp>
List: netbsd-bugs
Date: 08/24/2003 00:27:40
>Number:         22581
>Category:       bin
>Synopsis:       some properties in selection mode of wsmoused.conf should be in the global scope
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 23 15:29:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Ryo HAYASAKA
>Release:        NetBSD 1.6W
>Organization:
Japan Advanced Institute of Science and Technology (JAIST)
>Environment:
System: NetBSD bonnie.ryoh.net 1.6W NetBSD 1.6W (BONNIE) #371: Sat Aug 23 00:20:43 JST 2003 ryoh@bonnie.ryoh.net:/sys/arch/i386/compile/BONNIE i386
Architecture: i386
Machine: i386
>Description:
According to the man page of wsmoused.conf, the properties, "fifo",
"ttystat", and "xconsole", are in selection mode.  I think these
properties have not to do with the selection mode.  So, they should move
up to the global.

The "fifo" property is ignored in the current implementation.

The following patch also contains collecting spelling-miss of the man
page of wsmoused.conf and updating the example of wsmoused.conf.
	
>How-To-Repeat:
	
>Fix:
Index: usr.sbin/wsmoused/wsmoused.c
===================================================================
RCS file: /usr/cvsup/src/usr.sbin/wsmoused/wsmoused.c,v
retrieving revision 1.13
diff -d -p -u -r1.13 wsmoused.c
--- usr.sbin/wsmoused/wsmoused.c	6 Aug 2003 23:58:40 -0000	1.13
+++ usr.sbin/wsmoused/wsmoused.c	23 Aug 2003 14:47:25 -0000
@@ -527,6 +527,8 @@ main(int argc, char **argv)
 	if (Mouse.m_devname == NULL)
 		Mouse.m_devname = block_get_propval(conf, "device",
 		    _PATH_DEFAULT_MOUSE);
+	if (Mouse.m_fifoname == NULL)
+		Mouse.m_fifoname = block_get_propval(conf, "fifo", NULL);
 	init_mouse();
 	if (modelist != NULL)
 		attach_modes(modelist);
Index: usr.sbin/wsmoused/wsmoused.conf.5
===================================================================
RCS file: /usr/cvsup/src/usr.sbin/wsmoused/wsmoused.conf.5,v
retrieving revision 1.5
diff -d -p -u -r1.5 wsmoused.conf.5
--- usr.sbin/wsmoused/wsmoused.conf.5	6 Aug 2003 22:11:50 -0000	1.5
+++ usr.sbin/wsmoused/wsmoused.conf.5	23 Aug 2003 14:38:01 -0000
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 6, 2003
+.Dd August 23, 2003
 .Dt WSMOUSED.CONF 5
 .Os
 .Sh NAME
@@ -103,6 +103,10 @@ The
 device name to use.
 Defaults to
 .Pa /dev/wsmouse .
+.It fifo = pathname;
+Specify an optional fifo where to redirect all mouse events, no matter
+if they have been processed.
+By default, no fifo is used.
 .It modes = string;
 Whitespace separated list of modes to be activated when running.
 Defaults to
@@ -117,6 +121,17 @@ and have the
 .Sq .pid
 extension automatically added.
 By default it is set to daemon's program name.
+.It ttystat = pathname;
+.Xr wsdisplay 4 Ns 's
+notification device.
+Defaults to
+.Pa /dev/ttyEstat .
+You will not want to change this.
+.It xconsole = integer;
+Virtual console number which holds the X server (if any).
+The argument specifies the console number (the same found in
+.Pa /dev/ttyE? ) .
+Unset by default.
 .El
 .Ss Properties specific to the action mode
 The following properties are only useful when running in the
@@ -132,14 +147,14 @@ The
 part selects a button to which the command is assigned; the first button
 is numbered
 .Sq 0
-and the maximun depends on the mouse type.
+and the maximum depends on the mouse type.
 The
 .Sq status
 part can be either
 .Sq down
 or
 .Sq up ,
-representing the events emmited when the button is pressed and released,
+representing the events emitted when the button is pressed and released,
 respectively.
 .El
 .Ss Properties specific to the selection mode
@@ -147,10 +162,6 @@ The following properties are only useful
 .Em selection
 mode:
 .Bl -tag -width indent
-.It fifo = pathname;
-Specify an optional fifo where to redirect all mouse events, no matter
-if they have been processed.
-By default, no fifo is used.
 .It lefthanded = boolean;
 Set to 1 to swap mouse buttons, specially useful for left handed users.
 .It slowdown_x = integer;
@@ -164,17 +175,6 @@ Y axis slowdown.
 This positive integer specifies how many events in
 the horizontal direction should be ignored before changing the current row.
 It defaults to 3.
-.It ttystat = pathname;
-.Xr wsdisplay 4 Ns 's
-notification device.
-Defaults to
-.Pa /dev/ttyEstat .
-You will not want to change this.
-.It xconsole = integer;
-Virtual console number which holds the X server (if any).
-The argument specifies the console number (the same found in
-.Pa /dev/ttyE? ) .
-Unset by default.
 .El
 .Sh FILES
 .Bl -tag -width /usr/share/examples/wsmoused/ -compact
Index: share/examples/wsmoused/wsmoused.conf
===================================================================
RCS file: /usr/cvsup/src/share/examples/wsmoused/wsmoused.conf,v
retrieving revision 1.3
diff -d -p -u -r1.3 wsmoused.conf
--- share/examples/wsmoused/wsmoused.conf	6 Aug 2003 22:16:34 -0000	1.3
+++ share/examples/wsmoused/wsmoused.conf	23 Aug 2003 14:51:25 -0000
@@ -12,15 +12,15 @@ device = /dev/wsmouse;
 # List of modes that will be activated at runtime (selection is the default).
 #modes = "selection action";
 
-# Selection mode (sel) specific configuration.
+# The console where the X server runs (usually /dev/ttyE4).
+#xconsole = 4;
+
+# Selection mode specific configuration.
 mode selection {
 
 #	Tune mouse movement speed.
 #	slowdown_x = 0;
 #	slowdown_y = 3;
-
-#	The console where the X server runs (usually /dev/ttyE4).
-#	xconsole = 4;
 
 }
	
>Release-Note:
>Audit-Trail:
>Unformatted: