Re: ksh "clear-screen" editing command

2018-06-17 Thread Il Ka
> alternative that doesn't require linking ksh with 
> curses? 

I'm curious, is it possible to use termcap/terminfo directly here?



--
Sent from: 
http://openbsd-archive.7691.n7.nabble.com/openbsd-dev-tech-f151936.html



Documentation for makeoptions DEBUG="-g" may need improvement

2018-06-13 Thread IL Ka
Hello,

config(8) says:
"To debug kernels and their crash dumps with gdb, add “makeoptions
DEBUG="-g"” to the kernel configuration file.  Refer to options(4) for
further details."

1) kernel Makefile has DEBUG?= -g so you do not need to add
anything to have it: you just need not to overwrite it

2) -g otpion is used not only for bsd.gdb: it also adds debug symbols
to .obj files, which is used by objdump -dlr as covered here:
https://www.openbsd.org/ddb.html

options(4) says:
"makeoptions DEBUG=""
Do not build the debug kernel bsd.gdb."

It is true, however it still says -g is used only for bsd.gdb

/sys/arch//compile/GENRIC/obj/Makefile says:
"# DEBUG is set to -g by config if debugging is requested (config -g)."

But config(8) does not have "-g" option
(I believe it had it many years ago, but it is now controlled by
options(4)).


All of that could be confusing.
Some may think that  "makeoptions DEBUG=""" only disables bsd.gdb,
but with it you have .obj files with no debug info,
so https://www.openbsd.org/ddb.html recipe does not work.

I know that users should not recompile kernels, but I suggest to:

* Fix config(8) man page:
It should say that "-g" is default unless you set DEBUG="" explicitly
* Add paragraph to config(8) and options(4) that says -g is needed
to have .obj files with debug symbols
* Add line to "ddb.html" that says you need to build kernel with "-g"
(do not turn it off) to be able to run objdump -ldr
* Change comment in Makefile about "-g" option.

I can prepare diff if you agree.


Re: Odd Public WiFi breaks dhclient(8) but works for iPhone (Fix!)

2018-06-11 Thread Il Ka
>>This cannot possibly work, the client can't find the 
lladdr of the gateway

Oops, I now see my experiment was not valid: dhcpcd adds route to router but
can't reach it.
I added alias and it now works, thank you.

So, dhcp client assumes that router anounced by server is always reachable
by
interface that got configuration via dhcp.
Something that is not written explicitly in RFC, but seems to be de-facto
standard,
and it now supported by openbsd, thanks to this patch.



--
Sent from: 
http://openbsd-archive.7691.n7.nabble.com/openbsd-dev-tech-f151936.html



Re: Odd Public WiFi breaks dhclient(8) but works for iPhone (Fix!)

2018-06-11 Thread Il Ka
>Which RFC?
It says "IP addresses for routers on the client's subnet", so my idea was
that router must be on client subnet.

>We already deal with this for the case fairly common in VPS where the 
>client gets a /32 with a router outside the subnet
But how does it work from client side?
Does your dhcpd server send static route to router?

>How did you configure the rest of networking on the router to cope 
>with this setup?

I have interface with 10.10.10.1 and dhcpd server with configuration
provided above,
I then run dhcpcd (I have not tried it with ICS dhcp client) and got broken
routing.

Here is my point: in some installations gateway may reside outside of client
network.
Is it valid?

If it is, then why do we need to fix client (why do we need this patch?)?
It it is not, then should not dhcpd log warnings about such configuration?




--
Sent from: 
http://openbsd-archive.7691.n7.nabble.com/openbsd-dev-tech-f151936.html



Re: Odd Public WiFi breaks dhclient(8) but works for iPhone (Fix!)

2018-06-10 Thread Il Ka
I just checked how openbsd dhcpd handles this:

subnet 10.10.10.0  netmask 255.255.255.0 {
option routers 20.10.10.1;

range 10.10.10.10 10.10.10.50;
}

It starts fine and happily sends unusable configuration to client.

dhcpcd (dhcp client I use on linux-based client) installed funny routes:
0.0.0.0 -- 20.10.10.1
20.10.10.1 -- 0.0.0.0

So, Internet connection does not work.

I can't tell openbsd team what to do, but here are my thoughts:
If we believe that router should always be in client network then we should
fix dhcpd also making it to refuse to run with this configuration, should
not we?

If dhcpd accepts this config that means openbsd treats it as valid. 
Then, we should not fix client also.

In theory one may need to send router address to client to be accessed
by different interface configured by different dhcp server (or, even,
manually).
But as far as I understand RFC, this is not allowed.



--
Sent from: 
http://openbsd-archive.7691.n7.nabble.com/openbsd-dev-tech-f151936.html



Re: Odd Public WiFi breaks dhclient(8) but works for iPhone (Fix!)

2018-06-10 Thread Il Ka
Another approach is to extend subnet by decreasing mask to include router to
client subnet.
I.e.: 10.112.38.73/16.

dhcp-options(5), RFC-2132: "The router option specifies a list of IP
addresses for routers on the client's subnet." 

>From my point of view dhcp server in your example violates RFC, it is
misconfigured
and should not work at all. 



--
Sent from: 
http://openbsd-archive.7691.n7.nabble.com/openbsd-dev-tech-f151936.html



Re: [patch] rc.subr support for pidfile-based daemons

2018-06-02 Thread IL Ka
>
> pid files can easily get out of sync with the expected process (example:
> daemon starts, writes a pid file, later it crashes. at any point between
> the crash and you trying to stop/restart the daemon another process
> could be assigned the same pid, then the wrong process is signalled).
>

Wow, I've never thought about that)
pidfiles are so common on unicies, and mentioned in docs like "standard"
approach:
For example: http://uwsgi-docs.readthedocs.io/en/latest/Management.html
# using kill to send the signal
kill -HUP `cat /tmp/project-master.pid`

Is it because other OSes do not randomize pids as OpenBSD does (they use
sequental pids)
so chances for pid reuse are lower there?

Or do they simply "do not care"?

Anyway, if this is done intentionally, my approach is not correct.

Ilya.


[patch] rc.subr support for pidfile-based daemons

2018-06-02 Thread Il Ka
Hello,

rc.subr(8) uses pgrep(1)/pkill(1) to control daemons
using their command lines.

But in some cases it is more convenient to use pidfiles.
Many services do so, inluding apache and postgresql.
But not all services do have special tool for that.

I run gunicorn (python wsgi server) that is able to
produce pidfile, but lacks of tool to control it.

So, I added ``daemon_pidfile`` variable to rc.subr(8).
If this variable is not set then everything works as usual.

But if you set it then system uses it to check (ps -p), 
stop and reload (kill) daemon.

I then simply tell gunicorn to write its pidfile and 
everything works.

I believe this approach may be used by other rc scripts also.

Diff below does not have man yet, and I am ready to write it
if everyone would agree with my changes.

Ilya.



Index: etc/rc.d/rc.subr
===
RCS file: /cvs/src/etc/rc.d/rc.subr,v
retrieving revision 1.127
diff -u -p -u -r1.127 rc.subr
--- etc/rc.d/rc.subr5 Jun 2017 18:31:23 -   1.127
+++ etc/rc.d/rc.subr2 Jun 2018 19:33:29 -
@@ -49,6 +49,7 @@ _rc_write_runfile() {
cat >${_RC_RUNFILE} 

Re: FreeBSD tabs(1) ported to OpenBSD

2018-05-29 Thread Il Ka
Minor note: instead of including compilation instructions to code, 
is not it better to use bsd make system?

Following Makefile does the trick:

PROG=tabs
LDADD+=-lncursesw
.include


With it you can "make" and "make install" your app.




--
Sent from: 
http://openbsd-archive.7691.n7.nabble.com/openbsd-dev-tech-f151936.html



Re: Does "no wxallowed" FS always disable wxneeded apps?

2018-04-30 Thread Il Ka
Let me clarify why do I care about it:

Python uses WX_NEEDED:
https://github.com/openbsd/ports/commit/484e46033eca9a946a592d9db5ff168501820df3

People can't use virtualenv: a popular approach when python
is copied to home dir:
http://openbsd-archive.7691.n7.nabble.com/Best-Practices-python-virtualenv-tt342219.html

Easy fix is to rebuild python from port with this opt. disabled, but as you
can see
people do not know it. I think if  improve doc a little bit it will help
them.







--
Sent from: 
http://openbsd-archive.7691.n7.nabble.com/openbsd-dev-tech-f151936.html



Does "no wxallowed" FS always disable wxneeded apps?

2018-04-30 Thread IL Ka
Hello,
It seems that app with OPENBSD_WXNEED header
can't be launhed on fs, mounted with out of wxallowed.

Call (I assume execve) returns "Permission denied"
for such binaries.

Is it correct?

So, to use WX pages I need:
1) link it with -z wxneeded (I will get "Not supported" from mmap otherwise)
2) use wxallowed fs (or I will get "Permission denied")

Right?

May I suggest to make this fact more clear in docs?

mount(8) says:
"  wxallowed  Processes that ask for memory to be made writeable
plus executable using the mmap(2) and mprotect(2)"

But it is not becuase it uses mmap or any other func.
It is because it has  OPENBSD_WXNEED  header,
because it is linked with -z wxneeded
(either manually or by setting  USE_WXNEEDED in ports)

ld(1) could also be updated saying that
"wxneeded-enabled apps can't be launched on FS with out of wxallowed".

"bsd.ports.mk" or ports(7) could also document
USE_WXNEEDED variable in such manner.


I can prepare patches if you agree.

Ilya.


Broken links in fc-*man pages (fontconfig)

2018-04-29 Thread IL Ka
fc-list(1) and friends man pages

Have link to
/usr/share/doc/fontconfig/fontconfig-user.html

Which must be
/usr/X11R6/share/doc/fontconfig/fontconfig-user.html

Apps that are part of Xorg (like xterm) have special
macros in their man pages,
while fontconfig mans are generated from sgml and
seems to have hardcode.

I can patch them, but not sure which approach should I take:
Add macros to sgml somehow?
Get rid of sgml?


Re: options(4) improvements

2018-04-25 Thread Il Ka
>>patch:  malformed patch at line 44: kernel. 

Hm. Lets try again. 
Attached patch works for me on latest version from git.
I also uploaded it to https://pastebin.com/raw/LqsbWk5x
so, you can do
$ ftp -o- https://pastebin.com/raw/LqsbWk5x   | dos2unix  | patch

But I just ran patch attached below on latest commit ("New regress to handle
flags") and it worked.







--
Sent from: 
http://openbsd-archive.7691.n7.nabble.com/openbsd-dev-tech-f151936.html



Re: on-line kernel debugging

2018-04-24 Thread Il Ka
Hello,

I am also interested in kernel debugging.
> but we do support running gdb inside a system against its running kernel
Thank you for this recipe, but is it true that live debug does not work for
some cases?
You can't set break point in wsconsole and tty and debug them nor you can
debug kernel that 
is frozen, and it seems that remote debug 
(like http://www.netbsd.org/docs/kernel/kgdb.html)
is not supported by obsd, right?

Is it because of security reasons?






--
Sent from: 
http://openbsd-archive.7691.n7.nabble.com/openbsd-dev-tech-f151936.html



Re: [patch] unify wm setting for xinit (xinitrc) and xenodm (Xsession), move to it config.site

2018-04-24 Thread Il Ka
> Or one could read the FAQ and copy xinitrc to .xinitrc (or Xsession to 
> .xsession) in their home directory and use vi to add their preferred
> window manager? 
Sure)
But still there is inconsistence between how xinit and xenodm configure
their wms: xinit has it as configure parameter, and xenodm has hardcode.

I was trying to unify it for the next step: use symbolic link or shell
script 
instead of real wm to make it configurable by installation process
(install.sub).

It is not hard to run ``rcctl enable xenodm`` manually, but obsd
provides this functionality using installation script:
https://github.com/openbsd/src/blob/master/distrib/miniroot/install.sub#L2053

So my idea was that after
"Do you want the X Window System to be started by xenodm(1)?" [yes]
we may have
"Choose window manager[fvwm,cwm,twm]" [fvwm]

Do you think we do not need it?





--
Sent from: 
http://openbsd-archive.7691.n7.nabble.com/openbsd-dev-tech-f151936.html



[patch] unify wm setting for xinit (xinitrc) and xenodm (Xsession), move to it config.site

2018-04-24 Thread IL Ka
Hello,

There are 2 separate places with fvwm hardcoded in Xenocara:
1) xinitrc (used by xinit/startx)
2) Xsession (used by xenodm)

xinit's configure.ac has separate setting for it, so I
added same setting for xenodm configure.ac, recreated configure script
and extracted setting to config.site.

One can now change fvwm to cwm in config.site, and rebuild X11.

I also have an idea (not implemented yet) to have soft link
(i.e. /etc/X11/wm) and use it in both scripts.

We can then add step to sys/distrib/miniroot/install.sub
that asks user if she wants to have {fvwm,cwm,twm} and create
approprite link.
So, one may choose window manager as part of installation process
and have it for xenodm and startx.

diff --git app/xenodm/config/Xsession.in app/xenodm/config/Xsession.in
index 1a1b6ab2..f840c888 100644
--- app/xenodm/config/Xsession.in
+++ app/xenodm/config/Xsession.in
@@ -71,6 +71,6 @@ else
@XRDB_PROGRAM@ -load "$resources"
fi
@bindir@/xterm &
-   @bindir@/fvwm
+   @bindir@/@WM@
 fi
 do_exit
diff --git app/xenodm/configure app/xenodm/configure
index 1686d7e2..04c0873a 100755
--- app/xenodm/configure
+++ app/xenodm/configure
@@ -672,6 +672,7 @@ XENODM_CFLAGS
 SHELL_CMD
 WTMP_FILE
 UTMP_FILE
+WM
 DEFAULTVT
 XENODMLOGDIR
 XENODMSCRIPTDIR
@@ -843,6 +844,7 @@ with_xenodmconfigdir
 with_xenodmscriptdir
 with_logdir
 with_default_vt
+with_wm
 with_utmp_file
 with_wtmp_file
 with_color_pixmap
@@ -1553,6 +1555,7 @@ Optional Packages:
   (default=/var/log)
   --with-default-vt=
   specify default vt to start xenodm on
(default=none)
+  --with-wm=WMPath to default window manager
   --with-utmp-file=
   specify file to pass to sessreg -u for current
   logins
@@ -18809,6 +18812,16 @@ fi



+
+# Check whether --with-wm was given.
+if test "${with_wm+set}" = set; then :
+  withval=$with_wm; WM="$withval"
+else
+  WM="fvwm"
+fi
+
+
+
 # Ideally we'd just pull out UTMP_FILE & WTMP_FILE from 
 # but that's not easy to do in autoconf

diff --git app/xenodm/configure.ac app/xenodm/configure.ac
index 76702564..45a0ff40 100644
--- app/xenodm/configure.ac
+++ app/xenodm/configure.ac
@@ -93,6 +93,12 @@ AC_ARG_WITH(default-vt,
[DEFAULTVT="$withval"], [[DEFAULTVT=""]])
 AC_SUBST(DEFAULTVT)

+AC_ARG_WITH(wm,
+AS_HELP_STRING([--with-wm=WM], [Path to default window manager]),
+[WM="$withval"],
+[WM="fvwm"])
+AC_SUBST(WM)
+
 # Ideally we'd just pull out UTMP_FILE & WTMP_FILE from 
 # but that's not easy to do in autoconf
 AC_ARG_WITH(utmp_file,
diff --git etc/config.site etc/config.site
index 2681f486..b3223582 100644
--- etc/config.site
+++ etc/config.site
@@ -27,3 +27,4 @@
ac_cv_prog_lex_yytext_pointer=${ac_cv_prog_lex_yytext_pointer=yes}
 ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes}
 lt_cv_sys_max_cmd_len=${lt_cv_sys_max_cmd_len=131072}
 lt_cv_path_SED=${lt_cv_path_SED=/usr/bin/sed}
+with_wm=fvwm


Re: options(4) improvements

2018-04-24 Thread IL Ka
Hello  Jason,
here is new patch.



diff --git share/man/man4/options.4 share/man/man4/options.4
index 9ef493cf6..b0b0605c2 100644
--- share/man/man4/options.4
+++ share/man/man4/options.4
@@ -83,8 +83,7 @@ system call.
 .It Cd option DDB
 Compiles in a kernel debugger for diagnosing kernel problems.
 See
-.Xr ddb 4
-for details.
+.Xr ddb 4 .
 .It Cd option DDB_SAFE_CONSOLE
 Allows a break into the kernel debugger during boot.
 Useful when debugging problems that can cause
@@ -114,8 +113,7 @@ Adds code to the kernel for kernel profiling with
 Adds hooks for the system call tracing facility, which allows users to
 watch the system call invocation behavior of processes.
 See
-.Xr ktrace 1
-for details.
+.Xr ktrace 1 .
 .It Cd option NO_PROPOLICE
 Do not compile the kernel with the ProPolice stack protection.
 See
@@ -125,8 +123,7 @@ for more information about ProPolice.
 Adds hooks for the process tracing facility, allowing a process to
 control and observe another process.
 See
-.Xr ptrace 2
-for details.
+.Xr ptrace 2 .
 .It Cd option SMALL_KERNEL
 Removes some features and some optimizations from the kernel to reduce the
 size of the resulting kernel binary.
@@ -135,13 +132,11 @@ for general purpose kernels.
 .It Cd option VFSLCKDEBUG
 Turns on debugging for the Virtual File System interface.
 See
-.Xr vfs 9
-for details.
+.Xr vfs 9 .
 .It Cd option WITNESS
 Compiles in a lock checker for detecting lock order violations in the
kernel.
 See
-.Xr witness 4
-for details.
+.Xr witness 4 .
 .It Cd option WITNESS_COUNT= Ns Ar integer
 Maximum number of lock types that are tracked by
 .Xr witness 4 .
@@ -154,8 +149,7 @@ Includes code for the ISO 9660 + Rock Ridge file
system, which is the
 standard file system used on many CD-ROMs.
 It also supports Joliet extensions.
 See
-.Xr mount_cd9660 8
-for details.
+.Xr mount_cd9660 8 .
 .It Cd option EXT2FS
 Includes code implementing the Second Extended File System
 .Em ( EXT2FS ) ,
@@ -175,8 +169,7 @@ differing byte-orders.
 That is, a big-endian machine will not be able to read an
 ext2fs filesystem created on an i386 or other little-endian machine.
 See
-.Xr mount_ext2fs 8
-for details.
+.Xr mount_ext2fs 8 .
 .It Cd option FFS
 Includes code implementing the Berkeley Fast File System
 .Em ( FFS ) .
@@ -193,8 +186,7 @@ for
 .Pa /tmp
 or similar mount points.
 See
-.Xr mount_mfs 8
-for details.
+.Xr mount_mfs 8 .
 .It Cd option MSDOSFS
 Includes support for the MS-DOS FAT file system.
 The kernel also implements the Windows 95
@@ -202,8 +194,7 @@ extensions which permit the use of longer, mixed-case
file names.
 See
 .Xr mount_msdos 8
 and
-.Xr fsck_msdos 8
-for details.
+.Xr fsck_msdos 8 .
 .It Cd option NFSCLIENT
 Include the client side of the
 .Em NFS
@@ -217,18 +208,15 @@ for details on NFS.
 .It Cd option NTFS
 Includes support for reading NTFS file systems.
 See
-.Xr mount_ntfs 8
-for details.
+.Xr mount_ntfs 8 .
 .It Cd option UDF
 Includes code for the UDF file systems typically found on DVD discs.
 See
-.Xr mount_udf 8
-for details.
+.Xr mount_udf 8 .
 .It Cd option TMPFS
 Includes code for the TMPFS efficient memory file system.
 See
-.Xr mount_tmpfs 8
-for details.
+.Xr mount_tmpfs 8 .
 .El
 .Sh FILE SYSTEM OPTIONS
 .Bl -ohang
@@ -256,8 +244,7 @@ retaining the safety of synchronous metadata updates.
 .Pp
 Soft updates must be enabled on a per-filesystem basis.
 See
-.Xr mount 8
-for details.
+.Xr mount 8 .
 .Pp
 Processors with a small kernel address space, such as the sun4 and sun4c,
do
 not have enough kernel memory to support soft updates.
@@ -282,8 +269,7 @@ work.
 See
 .Xr mountd 8
 and
-.Xr nfsd 8
-for details.
+.Xr nfsd 8 .
 .It Cd option QUOTA
 Enables kernel support for file system quotas.
 See
@@ -291,8 +277,7 @@ See
 .Xr edquota 8 ,
 .Xr repquota 8 ,
 and
-.Xr quota 1
-for details.
+.Xr quota 1 .
 Note that quotas only work on
 .Dq ffs
 file systems, although
@@ -309,6 +294,8 @@ in large directories.
 Provide in-kernel support for controlling VGA framebuffer mapping
 and PCI configuration registers by user-processes
 (such as an X Window System server).
+See
+.Xr xf86 4 .
 This option is supported on the
 .Va alpha ,
 .Va amd64 ,
@@ -323,15 +310,18 @@ Adds support for the
 boot option (User Kernel Config).
 Allows modification of kernel settings (e.g., device parameters) before
 booting the system.
+See
+.Xr boot_config 8 .
 .It Cd option CRYPTO
 Enables support for the kernel cryptographic framework.
 See
-.Xr crypto 9
-for details.
+.Xr crypto 9 .
 While not IP specific, this option is usually used in conjunction with
option
 .Em IPSEC .
 .It Cd option EISAVERBOSE
 Makes the boot process more verbose for EISA peripherals.
+See
+.Xr eisa 4 .
 .It Cd option KMEMSTATS
 The kernel memory allocator,
 .Xr malloc 9 ,
@@ -341,8 +331,12 @@ On those architectures that have it, this enables
multiprocessor support.
 .It Cd option PCIVERBOSE
 Makes the boot process more verbose for PCI peripherals
 (vendor names and other information is printed, etc.).

Re: Despite the man, wsmouse(4) can't be shared between X(1) and wsmoused(8) (workaround included)

2018-04-24 Thread IL Ka
Hello Jason,
Thank you.

So, "wsmouse(4)"'s "/dev/wsmouse" multiplexer allows only exclusivie access
now, right?

Should not we also document it in wsmouse(4) like
"/dev/wsmouse is multiplexer for all mice,
and can only be accessed exclusively by eitherws(4)/synaptics(4) or
wsmoused(8)"


Ilya.


Re: Fix for "config(8) "kernel building" instructions lead to bad kernel name (which breaks relink)"

2018-04-24 Thread IL Ka
Hello,

> i'd be tempted to remove the instructions for building off a cd-rom, and
> leaving it as an exercise to the reader.
I am OK with it.
Lack of instructions is better than instruction that leads to
broken relink.

> the second (more common usage case) works fine, right?
Yes.


report fb_queue error in fuse_lookup to simplify debugging [tiny patch]

2018-04-21 Thread IL Ka
There are some people on @misc faced with
"libfuse vnode reclaim failed" error.

http://openbsd-archive.7691.n7.nabble.com/sshfuse-fusefs-libfuse-vnode-reclaim-failed-td341072.html

I suggest to report errno explicitly so, people
will be able to use intro(2) to find description of error


diff --git sys/miscfs/fuse/fuse_lookup.c sys/miscfs/fuse/fuse_lookup.c
index 5ccc9fe81..a3c57abdf 100644
--- sys/miscfs/fuse/fuse_lookup.c
+++ sys/miscfs/fuse/fuse_lookup.c
@@ -196,8 +196,10 @@ fusefs_lookup(void *v)
 reclaim:
if (nid != dp->ufs_ino.i_number && nid != FUSE_ROOTINO) {
fbuf = fb_setup(0, nid, FBT_RECLAIM, p);
-   if (fb_queue(fmp->dev, fbuf))
-   printf("fusefs: libfuse vnode reclaim failed\n");
+   int queue_error;
+   queue_error = fb_queue(fmp->dev, fbuf);
+   if (queue_error != 0)
+   printf("fusefs: libfuse vnode reclaim failed:
%d\n", queue_error);
fb_delete(fbuf);
}
return (error);


Despite the man, wsmouse(4) can't be shared between X(1) and wsmoused(8) (workaround included)

2018-04-21 Thread IL Ka
man wsmoused:
"wsmoused will happily coexist with the X Window System, provided that the
mouse device is supported by wsmouse(4). "

I have wsmouse0 on pms0 (PS/2 controller emulation running on VirtualBox)

When moused works on /dev/wsmouse, X reports
that device /dev/wsmouse is busy and mouse does not work.

To investigate it, I tried to open(2) it and perror(3) said "Device busy":
I then stopped wsmoused, and open(2) worked.
So, X is right: it can't share /dev/wsmouse with wsmoused.

I then created custom ServerLayout for X
with InputDevice backed by "ws" driver pointing to "/dev/wsmouse0"

and it worked.

So, X can access my mouse directly (via /dev/wsmouse0) but not
via multiplex (/dev/wsmouse)

I have 2 approaches to fix it:
1) Update wsmoused(8) man page and write that user must stop it before X
2) Patch "ws" to probe first N mice: it will start X with mouse even if
wsmoused runs

Which one should I take?

I also suggest to move following phrase from wsmoused(8) to wsmouse(4) man:
"/dev/wsmouse (the multiplexer device that receives all mouse events from
all wsmouse compatible mice on the system)"

This information is vital to understand how wsmouse works, and it is not
easy to find now.
Should I do that?


Ilya.


[patch] man for vgafb(4) should have list of supported architectures

2018-04-16 Thread IL Ka
diff --git share/man/man4/vgafb.4 share/man/man4/vgafb.4
index d9ccfa469..6e9a9875c 100644
--- share/man/man4/vgafb.4
+++ share/man/man4/vgafb.4
@@ -31,6 +31,7 @@
 .Nm vgafb
 .Nd VGA frame buffer
 .Sh SYNOPSIS
+.Cd # sparc64, macppc
 .Cd "vgafb* at pci?"
 .Cd "wsdisplay* at vgafb?"
 .Sh DESCRIPTION


Fix for "config(8) "kernel building" instructions lead to bad kernel name (which breaks relink)"

2018-04-15 Thread IL Ka
See:
https://marc.info/?l=openbsd-bugs=152380023916176=2


diff --git usr.sbin/config/config.8 usr.sbin/config/config.8
index 748aaab7a..10fdf7b92 100644
--- usr.sbin/config/config.8
+++ usr.sbin/config/config.8
@@ -341,6 +341,7 @@ mounted on
 do the following:
 .Bd -literal -offset indent
 # cd /somedir
+# mkdir SOMEFILE && cd SOMEFILE
 # cp /usr/src/sys/arch/somearch/conf/SOMEFILE .
 # vi SOMEFILE  (to make any changes)
 # config -s /usr/src/sys -b . SOMEFILE


options(4) improvements

2018-04-15 Thread IL Ka
Links to appropriate man pages added


diff --git share/man/man4/options.4 share/man/man4/options.4
index 9ef493cf6..cf146d9a7 100644
--- share/man/man4/options.4
+++ share/man/man4/options.4
@@ -309,6 +309,9 @@ in large directories.
 Provide in-kernel support for controlling VGA framebuffer mapping
 and PCI configuration registers by user-processes
 (such as an X Window System server).
+See
+.Xr xf86 4
+for details.
 This option is supported on the
 .Va alpha ,
 .Va amd64 ,
@@ -323,6 +326,9 @@ Adds support for the
 boot option (User Kernel Config).
 Allows modification of kernel settings (e.g., device parameters) before
 booting the system.
+See
+.Xr boot_config 8
+for details.
 .It Cd option CRYPTO
 Enables support for the kernel cryptographic framework.
 See
@@ -332,6 +338,9 @@ While not IP specific, this option is usually used in
conjunction with option
 .Em IPSEC .
 .It Cd option EISAVERBOSE
 Makes the boot process more verbose for EISA peripherals.
+See
+.Xr eisa 4
+for details.
 .It Cd option KMEMSTATS
 The kernel memory allocator,
 .Xr malloc 9 ,
@@ -341,8 +350,14 @@ On those architectures that have it, this enables
multiprocessor support.
 .It Cd option PCIVERBOSE
 Makes the boot process more verbose for PCI peripherals
 (vendor names and other information is printed, etc.).
+See
+.Xr pci 4
+for details
 .It Cd option PCMCIAVERBOSE
 Makes the boot process more verbose for PCMCIA peripherals.
+See
+.Xr pcmcia 4
+for details.
 .It Cd option USER_PCICONF
 Enables the user level access to the PCI bus configuration space
 through ioctls on the
@@ -350,7 +365,9 @@ through ioctls on the
 device.
 It's used by the
 .Xr Xorg 1
-server on some architectures.
+server on some architectures,
+.Xr pcidump 8
+uses it also.
 See
 .Xr pci 4
 for details.
@@ -511,6 +528,9 @@ Double quotes are needed when specifying a negative
 .Ar value .
 .El
 .Sh SCSI SUBSYSTEM OPTIONS
+See
+.Xr scsi 4
+for details.
 .Bl -ohang
 .It Cd option SCSI_DELAY= Ns Ar value
 Delay for