Re: man 9 intro - improvements [and learning for me]?

2023-09-18 Thread Jason McIntyre
On Mon, Sep 18, 2023 at 12:21:48PM +, Christoff Humphries wrote:
> Greetings all.
> 
> I went searching for documentation about the kernel internals and was
> used to the intro(9) man page from NetBSD
> https://man.netbsd.org/intro.9 that had a lot more details. Would it 
> be a worthwhile project to attempt to do the same for OpenBSD?
> 
> I understand the annoyance of folks talking about what they intend or
> are going to do with no actual fruit, but wanted to check that the
> intro(9) is lacking and the information is not just stored somewhere
> else (other than "apropos -s 9 .").
> 
> I want to learn the internals of the OpenBSD kernel, too, and will do
> as mulander (and friends) did by learning a bit of code daily
> https://blog.tintagel.pl/2017/09/10/openbsd-daily-recap.html.
> 
> Seeking the learn and contribute, especially in the uvm, vmd/vmm, and
> possibly filesystem subsystems.
> 
> Thanks in advance!
> 

hi.

as far as i know, there is no real kernel overview page. so i guess
intro(9) would be the place. you could certainly try to do something
similar to netbsd's page - it would be more useful than what we have now.

jmc



Re: msyscall.2: Use .Fn instead of .Nm in DESCRIPTION

2023-09-14 Thread Jason McIntyre
On Thu, Sep 14, 2023 at 12:00:03PM -0400, Josiah Frentsos wrote:
> Index: msyscall.2
> ===
> RCS file: /cvs/src/lib/libc/sys/msyscall.2,v
> retrieving revision 1.2
> diff -u -p -r1.2 msyscall.2
> --- msyscall.227 Nov 2019 20:53:05 -  1.2
> +++ msyscall.214 Sep 2023 15:54:33 -
> @@ -41,7 +41,7 @@ If
>  is 0, no action is taken on the page that contains
>  .Fa addr .
>  .Pp
> -.Nm
> +.Fn msyscall
>  is currently intended for use by
>  .Xr ld.so 1
>  only, and may be called only once to indicate the location of
> 

fixed, thanks.
jmc



Re: recv.2: Remove an extra space in the formatted output

2023-08-16 Thread Jason McIntyre
On Wed, Aug 16, 2023 at 06:44:34PM -0400, Josiah Frentsos wrote:
> Index: lib/libc/sys/recv.2
> ===
> RCS file: /cvs/src/lib/libc/sys/recv.2,v
> retrieving revision 1.50
> diff -u -p -r1.50 recv.2
> --- lib/libc/sys/recv.2   9 Sep 2022 16:48:25 -   1.50
> +++ lib/libc/sys/recv.2   16 Aug 2023 22:08:42 -
> @@ -61,7 +61,7 @@ are used to receive messages from a sock
>  is normally used only on a
>  .Em connected
>  socket (see
> -.Xr connect 2 ).
> +.Xr connect 2 ) .
>  .Fn recvfrom ,
>  .Fn recvmsg ,
>  and
> 

fixed, thanks.
jmc



Re: cksum.1: use imperative tense

2023-08-16 Thread Jason McIntyre
On Wed, Aug 16, 2023 at 08:29:23PM -0700, patrick keshishian wrote:
> On Wed, Aug 16, 2023 at 7:02???PM Klemens Nanni  wrote:
> >
> > Consistent with other options and our manuals in general.
> >
> > Index: cksum.1
> > ===
> > RCS file: /cvs/src/bin/md5/cksum.1,v
> > retrieving revision 1.40
> > diff -u -p -r1.40 cksum.1
> > --- cksum.1 4 Aug 2022 06:20:24 -   1.40
> > +++ cksum.1 17 Aug 2023 01:31:19 -
> > @@ -131,7 +131,7 @@ Place the checksum into
> >  .Ar hashfile
> >  instead of stdout.
> >  .It Fl p
> > -Echoes stdin to stdout and appends the
> > +Echo stdin to stdout and append the
> >  checksum to stdout.
> 
> That sounds awkward. I'd rephrase it as "Echo stdin and append the
> checksum to stdout"
> Same below with md5.1 instance.
> 

well, that would be a bit less clear about where stdin goes. i'm not
sure it's an improvement.

kn: i'm ok with the changes. there's no need to insist on imperative
though: i know a lot of people will read it like "(the -p option) echoes
stdin" and imperative can sound stiff. still, it's better overall to
keep the page consistent, so ok.

jmc

> --patrick
> 
> 
> >  .It Fl q
> >  Only print the checksum (quiet mode) or if used in conjunction with the
> > @@ -141,16 +141,16 @@ flag, only print the failed cases.
> >  Reverse the format of the hash algorithm output, making
> >  it match the checksum output format.
> >  .It Fl s Ar string
> > -Prints a checksum of the given
> > +Print a checksum of the given
> >  .Ar string .
> >  .It Fl t
> > -Runs a built-in time trial.
> > +Run a built-in time trial.
> >  Specifying
> >  .Fl t
> >  multiple times results in the number of rounds being multiplied
> >  by 10 for each additional flag.
> >  .It Fl x
> > -Runs a built-in test script.
> > +Run a built-in test script.
> >  .El
> >  .Pp
> >  The default CRC used is based on the polynomial used for CRC error checking
> > Index: md5.1
> > ===
> > RCS file: /cvs/src/bin/md5/md5.1,v
> > retrieving revision 1.48
> > diff -u -p -r1.48 md5.1
> > --- md5.1   25 Jan 2019 00:19:25 -  1.48
> > +++ md5.1   17 Aug 2023 01:31:54 -
> > @@ -89,7 +89,7 @@ Place the checksum into
> >  .Ar hashfile
> >  instead of stdout.
> >  .It Fl p
> > -Echoes stdin to stdout and appends the
> > +Echo stdin to stdout and append the
> >  checksum to stdout.
> >  .It Fl q
> >  Only print the checksum (quiet mode) or if used in conjunction with the
> > @@ -100,16 +100,16 @@ Reverse the format of the hash algorithm
> >  it match the output format used by
> >  .Xr cksum 1 .
> >  .It Fl s Ar string
> > -Prints a checksum of the given
> > +Print a checksum of the given
> >  .Ar string .
> >  .It Fl t
> > -Runs a built-in time trial.
> > +Run a built-in time trial.
> >  Specifying
> >  .Fl t
> >  multiple times results in the number of rounds being multiplied
> >  by 10 for each additional flag.
> >  .It Fl x
> > -Runs a built-in test script.
> > +Run a built-in test script.
> >  .El
> >  .Sh EXIT STATUS
> >  These utilities exit 0 on success,
> >
> 



Re: httpd server "default" is not what I expected

2023-08-13 Thread Jason McIntyre
On Sun, Aug 13, 2023 at 11:21:39AM +0100, Stuart Henderson wrote:
> On 2023/08/13 11:13, Omar Polo wrote:
> > @@ -179,7 +179,8 @@ section starts with a declaration of the server
> >  Each
> >  .Ic server
> >  section starts with a declaration of the server
> > -.Ar name :
> > +.Ar name .
> > +If no one matches the request the first one defined is used.
> >  .Bl -tag -width Ds
> >  .It Ic server Ar name Brq ...
> >  Match the server name using shell globbing rules.
> 
> The rest looks good, but I think this might be a little more clear as:
> 

i just got to stuart's mail. this reads nice and clear too.
jmc

> 
>  Each
>  .Ic server
>  section starts with a declaration of the server
> -.Ar name :
> +.Ar name .
> +If a request does not match any server name, it is handled by the first
> +defined
> +.Ic server
> +section.
>  .Bl -tag -width Ds
>  .It Ic server Ar name Brq ...
>  Match the server name using shell globbing rules.
> 



Re: httpd server "default" is not what I expected

2023-08-13 Thread Jason McIntyre
On Sun, Aug 13, 2023 at 11:13:28AM +0200, Omar Polo wrote:
> [moving to tech@, there's a diff for the manpage below]
> 

hi. comments inline:

> 
> diff /usr/src
> commit - a7b17fe845fceeb2940fa5924ec5843681aa2c64
> path + /usr/src
> blob - 16b086a9ee00cd6d8e796a890e9774968556f147
> file + usr.sbin/httpd/httpd.conf.5
> --- usr.sbin/httpd/httpd.conf.5
> +++ usr.sbin/httpd/httpd.conf.5
> @@ -98,7 +98,7 @@ server "default" {
>  For example:
>  .Bd -literal -offset indent
>  ext_ip="10.0.0.1"
> -server "default" {
> +server "example.com" {
>   listen on $ext_ip port 80
>  }
>  .Ed
> @@ -179,7 +179,8 @@ section starts with a declaration of the server
>  Each
>  .Ic server
>  section starts with a declaration of the server
> -.Ar name :
> +.Ar name .
> +If no one matches the request the first one defined is used.

i think it'd be clearer to use "none" rather than "no one" here. i know
what you mean, but it's easy to confuse this with the idea of no person.

also you might want to stick a comma after "request".

i.e.

If none matches the request, the first one ...

jmc

>  .Bl -tag -width Ds
>  .It Ic server Ar name Brq ...
>  Match the server name using shell globbing rules.
> @@ -779,7 +780,7 @@ server "default" {
>  .Bd -literal -offset indent
>  prefork 2
>  
> -server "default" {
> +server "example.com" {
>   listen on * port 80
>  }
>  
> @@ -800,7 +801,7 @@ server "default" {
>  .Qq egress
>  group.
>  .Bd -literal -offset indent
> -server "default" {
> +server "example.com" {
>   listen on egress port 80
>  }
>  .Ed
> 



Re: add extract example to tar(1) man page

2023-08-03 Thread Jason McIntyre
ok!
jmc

On 3 August 2023 17:16:44 BST, aisha  wrote:
>On 23/08/03 04:26PM, Jason McIntyre wrote:
>> On Thu, Aug 03, 2023 at 11:05:16AM -0400, aisha wrote:
>> > On 23/08/03 10:51AM, aisha wrote:
>> > > On 23/08/03 09:45AM, Stuart Henderson wrote:
>> > > > On 2023/08/03 07:23, Jason McIntyre wrote:
>> > > > > On Wed, Aug 02, 2023 at 05:52:02PM -0400, aisha wrote:
>
>> yes, thanks! ok.
>> 
>> but you should change the text from
>> 
>>  Create a gzip(1) compressed archive ... to a file called...
>> to
>>  Create a gzip(1) compressed archive, called XXX, containing the
>>  files ...
>> 
>> as i suggested, because the syntax "create ... to a file" reads badly.
>> 
>
>Thanks, fixed.
>
>OK?
>
>Index: tar.1
>===
>RCS file: /cvs/src/bin/pax/tar.1,v
>retrieving revision 1.64
>diff -u -p -r1.64 tar.1
>--- tar.1  31 Mar 2022 17:27:14 -  1.64
>+++ tar.1  3 Aug 2023 16:14:11 -
>@@ -331,16 +331,16 @@ and
> .Pp
> .Dl $ tar c bonvole sekve
> .Pp
>-Output a
>+Create a
> .Xr gzip 1
>-compressed archive containing the files
>+compressed archive, called
>+.Pa foriru.tar.gz ,
>+containing the files
> .Pa bonvole
> and
>-.Pa sekve
>-to a file called
>-.Pa foriru.tar.gz :
>+.Pa sekve :
> .Pp
>-.Dl $ tar zcf foriru.tar.gz bonvole sekve
>+.Dl $ tar czf foriru.tar.gz bonvole sekve
> .Pp
> Verbosely create an archive, called
> .Pa backup.tar.gz ,
>@@ -349,7 +349,7 @@ of all files matching the shell
> function
> .Pa *.c :
> .Pp
>-.Dl $ tar zcvf backup.tar.gz *.c
>+.Dl $ tar cvzf backup.tar.gz *.c
> .Pp
> Verbosely list, but do not extract, all files ending in
> .Pa .jpeg
>@@ -358,6 +358,13 @@ from a compressed archive named
> Note that the glob pattern has been quoted to avoid expansion by the shell:
> .Pp
> .Dl $ tar tvzf backup.tar.gz '*.jpeg'
>+.Pp
>+Verbosely extract an archive, called
>+.Pa foo.tar.gz ,
>+to the directory
>+.Pa /var/foo :
>+.Pp
>+.Dl $ tar xvzf foo.tar.gz -C /var/foo
> .Pp
> For more detailed examples, see
> .Xr pax 1 .
>


Re: add extract example to tar(1) man page

2023-08-03 Thread Jason McIntyre
On Thu, Aug 03, 2023 at 11:05:16AM -0400, aisha wrote:
> On 23/08/03 10:51AM, aisha wrote:
> > On 23/08/03 09:45AM, Stuart Henderson wrote:
> > > On 2023/08/03 07:23, Jason McIntyre wrote:
> > > > On Wed, Aug 02, 2023 at 05:52:02PM -0400, aisha wrote:
> > > > > Hi,
> > > > >   Someone - https://www.youtube.com/watch?v=NQ5uD5x8vzg - mentioned 
> > > > > that our man page for tar(1) doesn't have an extract example, so I 
> > > > > thought it would be good to add a simple one which highlights a 
> > > > > common use case.
> > > > > 
> > > > > OK?
> > > > > 
> > > > 
> > > > hi.
> > > > 
> > > > the examples section is small enough that i suppose it wouldn;t be a
> > > > problem to add another one.
> > > 
> > > as it must be specified in a non-obvious place on the command line and
> > > it's not currently explained particularly clearly, I'd welcome an example
> > > using -C.
> > > 
> > > > it does add another example with a similar set of options though, all in
> > > > a different order. i wonder whether we should try and push the action as
> > > > the first option, so people can see what we're doing. so "cXXX" when the
> > > > example is to create, "tXXX" when listing? then keep the "vzf" options
> > > > that are so common in the same order?
> > > > 
> > > > then the second example is probably more helpful as "Create a gzip(1)
> > > > compressed archive blah.tgz".
> > > > 
> > > > i know this isn;t what you're posting about, so feel free to leave alone
> > > > if you don;t want to tackle that.
> > > > 
> > > > one more thing. you could as easily remove the text "the folder", but
> > > > i'd be tempted to use "directory", as that's more standard for our docs,
> > > > and how -C itself describes it.
> > > 
> > > strongly agree on options order and "directory".
> > 
> > Thanks for the comments!
> > Here's the updated patch.
> > 
> > OK?
> > 
> 
> Small change to address the backup/-p comments, I've removed the word -backup 
> from the tar archive name
> 
> OK?
> 

yes, thanks! ok.

but you should change the text from

Create a gzip(1) compressed archive ... to a file called...
to
Create a gzip(1) compressed archive, called XXX, containing the
files ...

as i suggested, because the syntax "create ... to a file" reads badly.

jmc

> Index: tar.1
> ===
> RCS file: /cvs/src/bin/pax/tar.1,v
> retrieving revision 1.64
> diff -u -p -r1.64 tar.1
> --- tar.1 31 Mar 2022 17:27:14 -  1.64
> +++ tar.1 3 Aug 2023 15:02:49 -
> @@ -331,7 +331,7 @@ and
>  .Pp
>  .Dl $ tar c bonvole sekve
>  .Pp
> -Output a
> +Create a
>  .Xr gzip 1
>  compressed archive containing the files
>  .Pa bonvole
> @@ -340,7 +340,7 @@ and
>  to a file called
>  .Pa foriru.tar.gz :
>  .Pp
> -.Dl $ tar zcf foriru.tar.gz bonvole sekve
> +.Dl $ tar czf foriru.tar.gz bonvole sekve
>  .Pp
>  Verbosely create an archive, called
>  .Pa backup.tar.gz ,
> @@ -349,7 +349,7 @@ of all files matching the shell
>  function
>  .Pa *.c :
>  .Pp
> -.Dl $ tar zcvf backup.tar.gz *.c
> +.Dl $ tar cvzf backup.tar.gz *.c
>  .Pp
>  Verbosely list, but do not extract, all files ending in
>  .Pa .jpeg
> @@ -358,6 +358,13 @@ from a compressed archive named
>  Note that the glob pattern has been quoted to avoid expansion by the shell:
>  .Pp
>  .Dl $ tar tvzf backup.tar.gz '*.jpeg'
> +.Pp
> +Verbosely extract an archive, called
> +.Pa foo.tar.gz ,
> +to the directory
> +.Pa /var/foo :
> +.Pp
> +.Dl $ tar xvzf foo.tar.gz -C /var/foo
>  .Pp
>  For more detailed examples, see
>  .Xr pax 1 .



Re: add extract example to tar(1) man page

2023-08-03 Thread Jason McIntyre
On Wed, Aug 02, 2023 at 05:52:02PM -0400, aisha wrote:
> Hi,
>   Someone - https://www.youtube.com/watch?v=NQ5uD5x8vzg - mentioned that our 
> man page for tar(1) doesn't have an extract example, so I thought it would be 
> good to add a simple one which highlights a common use case.
> 
> OK?
> 

hi.

the examples section is small enough that i suppose it wouldn;t be a
problem to add another one.

it does add another example with a similar set of options though, all in
a different order. i wonder whether we should try and push the action as
the first option, so people can see what we're doing. so "cXXX" when the
example is to create, "tXXX" when listing? then keep the "vzf" options
that are so common in the same order?

then the second example is probably more helpful as "Create a gzip(1)
compressed archive blah.tgz".

i know this isn;t what you're posting about, so feel free to leave alone
if you don;t want to tackle that.

one more thing. you could as easily remove the text "the folder", but
i'd be tempted to use "directory", as that's more standard for our docs,
and how -C itself describes it.

jmc

> Index: tar.1
> ===
> RCS file: /cvs/src/bin/pax/tar.1,v
> retrieving revision 1.64
> diff -u -p -r1.64 tar.1
> --- tar.1 31 Mar 2022 17:27:14 -  1.64
> +++ tar.1 2 Aug 2023 21:47:12 -
> @@ -359,6 +359,13 @@ Note that the glob pattern has been quot
>  .Pp
>  .Dl $ tar tvzf backup.tar.gz '*.jpeg'
>  .Pp
> +Verbosely extract an archive, called
> +.Pa foo-backup.tar.gz ,
> +to the folder
> +.Pa /var/foo :
> +.Pp
> +.Dl $ tar xzvf foo-backup.tar.gz -C /var/foo
> +.Pp
>  For more detailed examples, see
>  .Xr pax 1 .
>  .Sh DIAGNOSTICS
> 



Re: ualarm.3: cleanup, rewrites

2023-07-30 Thread Jason McIntyre
On Sun, Jul 30, 2023 at 08:20:31PM -0500, Scott Cheloha wrote:
> This patch drags ualarm.3 over to where alarm.3 is.  I think it reads
> better and the wording is truer to what the function actually does.
> In particular, ualarm(3) does not block or "wait": the alarm is
> scheduled for asynchronous delivery by the operating system.
> 
> I think I may have tried to clean this up two years ago.  I don't
> remember where that got sidetracked, but fwiw this was written from
> scratch using alarm.3 as a guide.
> 
> Two things I'm iffy on:
> 
> - "high resolution" or "high-resolution"?
> 
> - The current manual mentions an upper bound (2147483647).  I'm not
>   sure when, if ever, this was the real: useconds_t is unsigned, so an
>   upper bound of INT32_MAX seems off.
> 
>   I am leaning toward just leaving the patch as-is instead of trying
>   to guide the end-user through the minefield of matching bespoke
>   "_t" types to real types and limits.
> 
> Tweaks?  ok?
> 

hi.

fine by me. i would stick with "high resolution", purely because we seem
to have no other instances of "high-resolution".

jmc

> Index: ualarm.3
> ===
> RCS file: /cvs/src/lib/libc/gen/ualarm.3,v
> retrieving revision 1.17
> diff -u -p -r1.17 ualarm.3
> --- ualarm.3  26 Jul 2019 12:08:18 -  1.17
> +++ ualarm.3  31 Jul 2023 01:05:23 -
> @@ -32,7 +32,7 @@
>  .Os
>  .Sh NAME
>  .Nm ualarm
> -.Nd schedule signal after specified time
> +.Nd schedule high resolution SIGALRM delivery
>  .Sh SYNOPSIS
>  .In unistd.h
>  .Ft useconds_t
> @@ -45,31 +45,37 @@ This is a simplified interface to
>  .Pp
>  The
>  .Fn ualarm
> -function waits a count of
> +function schedules the
> +.Dv SIGALRM
> +signal for delivery to the calling process after at least the given number of
>  .Fa microseconds
> -before asserting the terminating signal
> -.Dv SIGALRM .
> -System activity or time used in processing the call may cause a slight
> -delay.
> -.Pp
> -If the
> +have elapsed.
> +If
>  .Fa interval
> -argument is non-zero, the
> +is non-zero,
> +the
>  .Dv SIGALRM
> -signal will be sent
> -to the process every
> +signal is scheduled for redelivery to the calling process every
>  .Fa interval
> -microseconds after the timer expires (e.g., after
> +microseconds thereafter.
> +.Pp
> +If an alarm is already pending,
> +an additional call to
> +.Fn ualarm
> +supersedes the prior call.
> +.Pp
> +If
>  .Fa microseconds
> -number of microseconds have passed).
> +is zero,
> +any pending alarm is cancelled and the value of
> +.Fa interval
> +is ignored.
>  .Sh RETURN VALUES
> -When the signal has successfully been caught,
> +The
>  .Fn ualarm
> -returns the amount of time left on the clock.
> -The maximum value for
> -.Fa microseconds
> -allowed
> -is 2147483647.
> +function returns the number of microseconds remaining until the next
> +alarm is scheduled for delivery,
> +or zero if no alarm is pending.
>  .Sh SEE ALSO
>  .Xr setitimer 2 ,
>  .Xr sigaction 2 ,
> @@ -86,5 +92,17 @@ function conforms to
>  .Sh HISTORY
>  The
>  .Fn ualarm
> -function appeared in
> +function first appeared in
>  .Bx 4.3 .
> +.Sh CAVEATS
> +The
> +.Fn ualarm
> +function is implemented with the per-process
> +.Dv ITIMER_REAL
> +timer described in
> +.Xr setitimer 2 .
> +Use of both
> +.Fn ualarm
> +and
> +.Xr setitimer 2
> +in the same program may yield confusing behavior.



Re: refcnt_init(9): Add missing word

2023-07-12 Thread Jason McIntyre
On Wed, Jul 12, 2023 at 12:19:40PM +0200, thib4711 wrote:
> diff --git a/share/man/man9/refcnt_init.9 b/share/man/man9/refcnt_init.9
> index 96fa94e7e64..142c1e57d8d 100644
> --- a/share/man/man9/refcnt_init.9
> +++ b/share/man/man9/refcnt_init.9
> @@ -71,7 +71,7 @@ is used to release an existing reference.
>  is used to release an existing reference and wakes up a process
>  that is currently waiting in
>  .Fn refcnt_finalize
> -for all the references to released.
> +for all the references to be released.
>  .Pp
>  .Fn refcnt_finalize
>  releases the caller's reference and sleeps until all the other
> 

fixed, thanks.
jmc



Re: pf(4) should mention DIOCXEND

2023-07-05 Thread Jason McIntyre
On Wed, Jul 05, 2023 at 11:10:11AM +0200, Alexandr Nedvedicky wrote:
> diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4
> index 92eeb45f657..7346c7e3194 100644
> --- a/share/man/man4/pf.4
> +++ b/share/man/man4/pf.4
> @@ -48,12 +48,25 @@ and retrieve statistics.
>  The most commonly used functions are covered by
>  .Xr pfctl 8 .
>  .Pp
> -Manipulations like loading a ruleset that involve more than a single
> +Operations loading or reading a ruleset that involve more than a single

just to check: if *only* loading and reading require tickets, this text is fine.
if other things require a ticket (or in the future are likely to),
you should reinstate "like".

>  .Xr ioctl 2
>  call require a so-called
> -.Em ticket ,
> -which prevents the occurrence of
> -multiple concurrent manipulations.
> +.Sy ticket ,
> +which allows
> +.Xr pf 4
> +to deal with concurrent operations.
> +For certain
> +.Xr ioctl 2
> +commands (currently
> +.Dv DIOCGETRULES )
> +the number of tickets program can get is limited.

s/program/a program/

> +The program must explicitly release the ticket using the
> +.Dv DIOCXEND
> +command to avoid hitting the limit.
> +All tickets which are not freed by
> +.Dv DIOCXEND
> +are released when the program closes
> +.Pa /dev/pf .
>  .Pp
>  Fields of
>  .Xr ioctl 2
> @@ -132,6 +145,9 @@ for subsequent
>  calls and the number
>  .Va nr
>  of rules in the active ruleset.
> +The ticket should be released by the
> +.Dv DIOCXEND
> +command.
>  .It Dv DIOCGETRULE Fa "struct pfioc_rule *pr"
>  Get a
>  .Va rule
> @@ -792,6 +808,10 @@ inactive rulesets since the last
>  .Dv DIOCXBEGIN .
>  .Dv DIOCXROLLBACK
>  will silently ignore rulesets for which the ticket is invalid.
> +.It Dv DIOCXEND Fa "u_int32_t *ticket"
> +Release ticket obtained by the
> +.Dv DIOCGETRULES
> +command.
>  .It Dv DIOCSETHOSTID Fa "u_int32_t *hostid"
>  Set the host ID, which is used by
>  .Xr pfsync 4

otherwise ok.

jmc



Re: pf(4) should mention DIOCXEND

2023-07-04 Thread Jason McIntyre
On Tue, Jul 04, 2023 at 04:35:23PM +0200, Alexandr Nedvedicky wrote:
> Hello,
> 
> diff below updates pf(4) manpage to reflect changes [1] which
> were committed earlier today.
> 
> does update to pf(4) read OK?
> 
> thanks and
> regards
> sashan
> 
> [1] https://marc.info/?l=openbsd-cvs=168848058603797=2
> https://marc.info/?l=openbsd-cvs=168847042626997=2
> 
> 8<---8<---8<--8<
> 
> diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4
> index 92eeb45f657..305c536b137 100644
> --- a/share/man/man4/pf.4
> +++ b/share/man/man4/pf.4
> @@ -48,12 +48,25 @@ and retrieve statistics.
>  The most commonly used functions are covered by
>  .Xr pfctl 8 .
>  .Pp
> -Manipulations like loading a ruleset that involve more than a single
> +Operations like loading or reading a ruleset that involve more than a single

you probably don;t need to add "or reading", since you already indicate
that it is just an example ("like"), not an exhaustive list. or is there
a specific reason to list reading a ruleset?

>  .Xr ioctl 2
>  call require a so-called
>  .Em ticket ,

should probably be Sy rather than Em, but don;t sweat it if such a
change would make the rest of the manual inconsistent.

> -which prevents the occurrence of
> -multiple concurrent manipulations.
> +which allows
> +.Xr pf 4
> +to deal with concurrent operations.
> +For certain
> +.Xr ioctl 2
> +commands (currently
> +.Dv DIOCGETRULES )
> +the number of tickets application can obtain is limited.

i'm not sure what this means. tickets per application? "tickets
application" does not read correctly.

> +The application must explicitly release the ticket using

s/using/using the/

or "using DIOCXEND to avoid..."

> +.Dv DIOCXEND
> +command to avoid hitting the limit.
> +All tickets which are not freed by
> +.Dv DIOCXEND
> +are released when application closes

s/application/the application/

> +.Pa /dev/pf .
>  .Pp
>  Fields of
>  .Xr ioctl 2
> @@ -132,6 +145,9 @@ for subsequent
>  calls and the number
>  .Va nr
>  of rules in the active ruleset.
> +The ticket should be released by

s/by/by the/

or maybe just "released by DIOCXEND".

> +.Dv DIOCXEND
> +command.
>  .It Dv DIOCGETRULE Fa "struct pfioc_rule *pr"
>  Get a
>  .Va rule
> @@ -792,6 +808,10 @@ inactive rulesets since the last
>  .Dv DIOCXBEGIN .
>  .Dv DIOCXROLLBACK
>  will silently ignore rulesets for which the ticket is invalid.
> +.It Dv DIOCXEND Fa "u_int32_t *ticket"
> +Release ticket obtained by
> +.Dv DIOCGETRULES
> +command.

again, either "by the XXX command" or "by XXX".

>  .It Dv DIOCSETHOSTID Fa "u_int32_t *hostid"
>  Set the host ID, which is used by
>  .Xr pfsync 4
> 

jmc



Re: wsmouse(4): multi-touch buttons again

2023-06-27 Thread Jason McIntyre
On Wed, Jun 28, 2023 at 12:03:41AM +0200, Ulf Brosziewski wrote:
> This version of the diff adds a wsconsctl field, named "mouse.tp.
> mtbuttons", and an update to the wsmouse.4 page.  Apart from that, it
> contains only stylistic changes.
> 
> The new wsconsctl field is just a boolean, I don't think that it would
> make sense to include the distance filter in the configuration options.
> However, if a default value is derived from the length of the touchpad
> diagonal, it might be too high for over-sized touchpads.  If that turns
> out to be a problem, the proper place to fix it is the hardware driver.
> 
> OK?
> 

hi.

one note about the doc:

> Index: src/share/man/man4/wsmouse.4
> ===
> RCS file: /cvs/src/share/man/man4/wsmouse.4,v
> retrieving revision 1.22
> diff -u -p -r1.22 wsmouse.4
> --- src/share/man/man4/wsmouse.4  4 Mar 2021 17:03:42 -   1.22
> +++ src/share/man/man4/wsmouse.4  27 Jun 2023 18:54:31 -
> @@ -106,6 +106,10 @@ If, within a short time interval, a seco
>  mapped to a left-button click, the button-up event is not issued
>  until that touch ends
>  .Pq Dq tap-and-drag .
> +.It Cm mouse.tp.mtbuttons
> +This feature is supported from some clickpads.
> +If enabled, two-finger clicks - with the fingers side by side - generate
> +left-button events, three-finger clicks generate middle-button events.

at a minimum, i'd put a semi-colon after "events", not a comma.

or you could join the two parts like this:

...generate left-button events, whilst three-finger clicks...

or more simple:

...generate left-button events, and three-finger clicks...

jmc

>  .It Cm mouse.tp.scaling
>  The value is a scale coefficient that is applied to the relative
>  coordinates.



Re: posix_spawn(3): explain that handling NULL envp is an extension

2023-06-26 Thread Jason McIntyre
On Sun, Jun 25, 2023 at 07:07:33PM -0300, Lucas de Sena wrote:
> The manual already describes how posix_spawn(3) behaves when passing it
> a NULL envp, but does not make it clear that it is an OpenBSD extension:
> 
> > If envp is NULL, the environment is passed unchanged from the parent
> > process.
> 
> That differs from GNU/Linux, for example, where a NULL envp gives the
> child an empty environment rather than a copy.
> 

fixed, thanks!
jmc

> 
> Index: posix_spawn.3
> ===
> RCS file: /cvs/src/lib/libc/gen/posix_spawn.3,v
> retrieving revision 1.9
> diff -u -p -r1.9 posix_spawn.3
> --- posix_spawn.3 17 Oct 2017 22:47:58 -  1.9
> +++ posix_spawn.3 25 Jun 2023 21:38:47 -
> @@ -122,6 +122,10 @@ with exit status 127.
>  .Sh STANDARDS
>  Both functions conform to
>  .St -p1003.1-2001 .
> +.Pp
> +The handling of NULL
> +.Fa envp
> +is an extension to that standard.
>  .Sh HISTORY
>  These functions were ported from
>  .Fx
> 



Re: lpd(8): document correct control character for DVI

2023-06-17 Thread Jason McIntyre
On Tue, Jun 13, 2023 at 06:02:01PM +, Lennart Jablonka wrote:
> r is for FORTRAN output, not for DVI.
> 

fixed, thanks.
jmc

> Index: lpd.8
> ===
> RCS file: /cvs/src/usr.sbin/lpr/lpd/lpd.8,v
> retrieving revision 1.32
> diff -u -p -r1.32 lpd.8
> --- lpd.8 10 Oct 2022 09:13:43 -  1.32
> +++ lpd.8 6 Jun 2023 12:30:54 -
> @@ -242,7 +242,7 @@ The file contains troff output (cat phot
>  .It n
>  Ditroff File.
>  The file contains device independent troff output.
> -.It r
> +.It d
>  DVI File.
>  The file contains
>  .Tn Tex l
> 



Re: fix markup in glob(7)

2023-05-29 Thread Jason McIntyre
On Tue, May 30, 2023 at 12:06:37AM -0400, aisha wrote:
> Hi,
> 
>   Was teaching glob(7) syntax to my brother and noticed that the markup for 
> [...] character classes was broken in HTML format from mandoc. Attached patch 
> renders the correct HTML.
> 
> Sidenote, mdoc(7) says 'Li' is deprecated but none of the suggested 
> replacements were working in this context.
> 
> OK?
> 
> Cheers,
> Aisha
> 

hi.

so your diff is technically correct, i think, so ok to commit it.
jmc

> diff --git a/share/man/man7/glob.7 b/share/man/man7/glob.7
> index 037cb52e438..443ef3c7b6f 100644
> --- a/share/man/man7/glob.7
> +++ b/share/man/man7/glob.7
> @@ -85,9 +85,9 @@ and
>  stands for the list of all characters belonging to that class.
>  Supported character classes:
>  .Bl -column "xdigit" "xdigit" "xdigit" -offset indent
> -.It Li "alnum" Ta "cntrl" Ta "lower" Ta "space"
> -.It Li "alpha" Ta "digit" Ta "print" Ta "upper"
> -.It Li "blank" Ta "graph" Ta "punct" Ta "xdigit"
> +.It Li "alnum" Ta Li "cntrl" Ta Li "lower" Ta Li "space"
> +.It Li "alpha" Ta Li "digit" Ta Li "print" Ta Li "upper"
> +.It Li "blank" Ta Li "graph" Ta Li "punct" Ta Li "xdigit"
>  .El
>  .Pp
>  These match characters using the macros specified in
> 



Re: calendar.usholiday: add Juneteenth

2023-05-15 Thread Jason McIntyre
ok.
jmc

On 15 May 2023 09:58:29 BST, "Anthony J. Bentley"  wrote:
>A federal holiday since 2021.
>
>ok?
>
>Index: usr.bin/calendar/calendars/calendar.usholiday
>===
>RCS file: /cvs/src/usr.bin/calendar/calendars/calendar.usholiday,v
>retrieving revision 1.9
>diff -u -p -r1.9 calendar.usholiday
>--- usr.bin/calendar/calendars/calendar.usholiday  19 Jan 2015 18:07:47 
>-  1.9
>+++ usr.bin/calendar/calendars/calendar.usholiday  15 May 2023 08:51:58 
>-
>@@ -22,6 +22,7 @@
> 05/SatThird   Armed Forces Day (3rd Saturday of May)
> 05/MonLastMemorial Day (Last Monday of May)
> 06/SunThird   Father's Day (3rd Sunday of June)
>+06/19 Juneteenth
> 06/21*Summer Solstice
> 07/04 Independence Day
> 09/MonFirst   Labor Day (1st Monday of September)
>


Re: Updated virtio.4 man page with viogpu device

2023-04-26 Thread Jason McIntyre
On Wed, Apr 26, 2023 at 07:32:07PM +, Eichert, Diana wrote:
> Based on this commit, https://marc.info/?l=openbsd-cvs=168201887006175=2 
> , add viogpu, a VirtIO GPU driver
> 
> Updated virtio.4 man page with viogpu device
> 
> diff -c virtio.4.orig virtio.4
> 
> 

fixed, thanks.
jmc

> *** virtio.4.orig   Wed Apr 26 13:07:35 2023
> --- virtio.4Wed Apr 26 13:10:31 2023
> ***
> *** 42,47 
> --- 42,49 
>   VirtIO disk
>   .It Xr viocon 4
>   VirtIO console device
> + .It Xr viogpu 4
> + VirtIO GPU device
>   .It Xr viomb 4
>   VirtIO memory ballooning driver
>   .It Xr viornd 4
> 



Re: mg.1: mark up commands

2023-04-25 Thread Jason McIntyre
On Tue, Apr 25, 2023 at 03:58:08PM +0200, Omar Polo wrote:
> The commands are sometimes typed as-is, sometimes in single quotes
> 'like-this' and sometime inside Dq.  I'd prefer to consistently use Ic
> for commands (which I believe is the appropriate mandoc macro).  As a
> by-product, this allows to jump via :t to the description, which is
> very handy.
> 
> I haven't touched the two tables with the default keybindings.  I
> think that is clear enough that those are commands, and tmux(1)
> doesn't markup commands/variables in tables either.  Plus, I think it
> would read weird with all that text in bold.
> 
> ok?
> 

hi.

i think it's fine to do this, if it means it is handled consistently.
i did not read the diff fully, but you should run it though mandoc
-Tlint to find things like missing blanks before punctuation. hint hint.

jmc

> Index: mg.1
> ===
> RCS file: /cvs/src/usr.bin/mg/mg.1,v
> retrieving revision 1.132
> diff -u -p -r1.132 mg.1
> --- mg.1  25 Apr 2023 13:32:20 -  1.132
> +++ mg.1  25 Apr 2023 13:47:56 -
> @@ -103,15 +103,20 @@ Backup files have a
>  character appended to the file name and
>  are created in the current working directory by default.
>  Whether to create backup files or not can be toggled with the
> -make-backup-files command.
> +.Ic make-backup-files
> +command.
>  The backup file location can either be in the current
>  working directory, or all backups can be moved to a
>  .Pa ~/.mg.d
>  directory where files retain their path name to retain uniqueness.
> -Use the backup-to-home-directory to alternate between these two locations.
> +Use the
> +.Ic backup-to-home-directory
> +command to alternate between these two locations.
>  Further, if any application creates backup files in
>  .Pa /tmp ,
> -these can be left with the leave-tmpdir-backups command.
> +these can be left with the
> +.Ic leave-tmpdir-backups
> +command.
>  .Sh TAGS
>  .Nm
>  supports tag files created by
> @@ -380,294 +385,306 @@ If a positive parameter is supplied, the
>  Otherwise, it is forced to off.
>  .\"
>  .Bl -tag -width x
> -.It apropos
> +.It Ic apropos
>  Help Apropos.
>  Prompt the user for a string, open the *help* buffer,
>  and list all
>  .Nm
>  commands that contain that string.
> -.It audible-bell
> +.It Ic audible-bell
>  Toggle the audible system bell.
> -.It auto-execute
> +.It Ic auto-execute
>  Register an auto-execute hook; that is, specify a filename pattern
>  (conforming to the shell's filename globbing rules) and an associated
>  function to execute when a file matching the specified pattern
>  is read into a buffer.
> -.It auto-fill-mode
> +.It Ic auto-fill-mode
>  Toggle auto-fill mode (sometimes called mail-mode) in the current buffer,
>  where text inserted past the fill column is automatically wrapped
>  to a new line.
> -Can be set globally with set-default-mode.
> -.It auto-indent-mode
> +Can be set globally with
> +.Ic set-default-mode.
> +.It Ic auto-indent-mode
>  Toggle indent mode in the current buffer,
>  where indentation is preserved after a newline.
> -Can be set globally with set-default-mode.
> -.It back-to-indentation
> +Can be set globally with
> +.Ic set-default-mode .
> +.It Ic back-to-indentation
>  Move the dot to the first non-whitespace character on the current line.
> -.It backup-to-home-directory
> +.It Ic backup-to-home-directory
>  Save backup copies to a
>  .Pa ~/.mg.d
>  directory instead of working directory.
> -Requires make-backup-files to be on.
> -.It backward-char
> +Requires
> +.Ic make-backup-files
> +to be on.
> +.It Ic backward-char
>  Move cursor backwards one character.
> -.It backward-kill-word
> +.It Ic backward-kill-word
>  Kill text backwards by
>  .Va n
>  words.
> -.It backward-paragraph
> +.It Ic backward-paragraph
>  Move cursor backwards
>  .Va n
>  paragraphs.
>  Paragraphs are delimited by  or  or .
> -.It backward-word
> +.It Ic backward-word
>  Move cursor backwards by the specified number of words.
> -.It beginning-of-buffer
> +.It Ic beginning-of-buffer
>  Move cursor to the top of the buffer.
>  If set, keep mark's position, otherwise set at current position.
>  A numeric argument
>  .Va n
>  will move n/10th of the way from the top.
> -.It beginning-of-line
> +.It Ic beginning-of-line
>  Move cursor to the beginning of the line.
> -.It blink-and-insert
> +.It Ic blink-and-insert
>  Self-insert a character, then search backwards and blink its
>  matching delimiter.
>  For delimiters other than
>  parenthesis, brackets, and braces, the character itself
>  is used as its own match.
> -Can be used in the startup file with the global-set-key command.
> -.It bsmap-mode
> +Can be used in the startup file with the
> +.Ic global-set-key
> +command.
> +.It Ic bsmap-mode
>  Toggle bsmap mode, where DEL and C-h are swapped.
> -.It c-mode
> +.It Ic c-mode
>  Toggle a KNF-compliant mode for editing C program files.
> -.It call-last-kbd-macro
> 

Re: chilepeso in units(1)

2023-04-12 Thread Jason McIntyre
On Wed, Apr 12, 2023 at 12:33:52PM +0200, Jan Stary wrote:
> An apparent typo was introduced in
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/units/units.lib.diff?r1=1.144=1.145=h
> 
> Does nobody use units(1) on their Chilean vacation anymore?
> 
>   Jan
> 

oops, that's one of mine. fixed now, thanks.
jmc

> 
> Index: units.lib
> ===
> RCS file: /cvs/src/usr.bin/units/units.lib,v
> retrieving revision 1.146
> diff -u -p -r1.146 units.lib
> --- units.lib 18 Nov 2022 19:07:54 -  1.146
> +++ units.lib 12 Apr 2023 10:33:22 -
> @@ -337,7 +337,7 @@ venezuelabolivar  1|2500064.0890 $
>  / The Economist, April 28, 2021
>  / Hungary, Iceland, Ukraine, Vietnam: no updates available since October 2018
>  argentinapeso1|93.4 $
> -chilepeso1|702 
> +chilepeso1|702 $
>  colombiapeso 1|3707 $
>  czechkoruna  1|21.4 $
>  egyptpound   1|15.7 $
> 



Re: route.8: markup route flags to get tags

2023-04-05 Thread Jason McIntyre
On Wed, Apr 05, 2023 at 10:20:40PM +0200, Ingo Schwarze wrote:
> Hi Klemens and Jason,
> 

hi.

> Jason McIntyre wrote on Wed, Apr 05, 2023 at 07:12:05PM +0100:
> > On Wed, Apr 05, 2023 at 01:07:18PM +, Klemens Nanni wrote:
> 
> >> To find out what a particular letter means, you must arrive at this list
> >> why generic means because the first column has no markup.
> >> 
> >> As mdoc(7) 'constant symbol' the lookup is much quicker, e.g.
> >>man -Otag=h route
> >> makes this the first line in the pager:
> >>MRTF_MODIFIED Modified dynamically (by redirect).
> 
> > tag=h? is that a typo?
> > 
> > anyway, i personally am not convinced that anyone would do this.
> 
> I use "-O tag" occasionally, in particular with very long and complex
> manual pages (and route(8) is complex and somewhat long), and i know
> Klemens uses it often.  Since implementing -O tag, i occasionally also
> got feedback from others who like it, though there are certainly many
> people who do not use it.
> 

although i don;t use tags, i wasn;t trying to be dismissive of it for
others. it was more that this example felt like overkill (because of the
potential number of pages that we'd have to adjust to do this in a
meaningful way).

> On top of that, the feature is very useful when providing user support
> for sending web links like
> 
>   https://man.openbsd.org/route.8#show
> 
> which points to the same place as
> 
>   $ man -O tag=show route
> 

yes, i get that. but per flag? for every page?

> > i mean, it is easier just to type "man route" then page down.
> 
> That works, too, but can become tedious in long and complex pages.
> 
> > is the added complexity really worth it?
> 
> The complexity feels minimal to me, it does nothing more than formally
> announcing that these flags serve a syntactic purpose, exactly like we
> already do it for the RTF_* flags on the same lines.
> 

i was thinking of the complexity of making this work in general.

> While the .Dv macro is not a perfect fit, i agree with Klemens that
> it is the best one available.
> 

i had originally thought to suggest Li (although i hate it).

anyway, when the tags stuff just works, i don;t have any issues. but
then when we start adding markup just to get it working, it
feels less great. doesn;t just being an .It argument promote the item to
being tagged? (well, i guess not, but then shouldn;t it?)

kn, i don;t really want to ok this, but i don;t want to object either if
people are genuinely using such stuff.

jmc

> > we must have a ton of pages with lists explaining flags.
> 
> I see no need to hunt down similar cases in the tree, but when people
> get annoyed with specific pages, i think it's fair to add tags
> if it's logically sound and easily possible.
> 
> There is one very minor gotcha with short tags like these.
> With Klemens' patch, try
> 
>   $ man -l -O tag=n route.8
> 
> which brings you to the -n command line option; then hit the "t" key
> once: it brings you to the RTF_CONNECTED ("n") flag...
> 
> So short tags tend to clash with unrelated stuff marked up with
> different macros, in this case .Fl and .Dv.
> 
> But that's not a game-breaker.  In a long and complex page, ":t nt" 
> may still be simpler than searching visually.
> 
> I refrained from making the tagging feature more complex and
> supporting stuff like "-O tag=Dv=n" vs. "-O tag=Fl=n", and i don't
> think that was a mistake.  Such clashes are not *that* common, so KISS.
> 
> > like
> > man -Otag=D ps
> > that doesn;t work either.
> 
> Probably wouldn't hurt either to make that work, but seems neither
> urgent nor required to make Klemens' patch useful.
> 
> >> Route flags that now produce an already existing tag don't conflict, i.e.
> >> ":tT" first shows
> >>  -T rtable
> >>  Select an alternate routing table to modify or query.  The
> >> and then on second "t"
> >>TRTF_MPLS MPLS route.
> 
> Oops, right, you found that too.
> 
> >> OK?
> 
> FWIW, i'm OK with this patch.
> 
> >> Index: route.8
> >> ===
> >> RCS file: /cvs/src/sbin/route/route.8,v
> >> retrieving revision 1.117
> >> diff -u -p -r1.117 route.8
> >> --- route.818 Mar 2023 11:44:53 -  1.117
> >> +++ route.85 Apr 2023 12:56:12 -
> >> @@ -401,27 +401,27 @@ Within the output of
> >>  the "Flags" column indicates what flags a

Re: route.8: markup route flags to get tags

2023-04-05 Thread Jason McIntyre
On Wed, Apr 05, 2023 at 01:07:18PM +, Klemens Nanni wrote:
> To find out what a particular letter means, you must arrive at this list
> why generic means because the first column has no markup.
> 
> As mdoc(7) 'constant symbol' the lookup is much quicker, e.g.
>   man -Otag=h route
> makes this the first line in the pager:
>MRTF_MODIFIED Modified dynamically (by redirect).
> 

tag=h? is that a typo?

anyway, i personally am not convinced that anyone would do this.
i mean, it is easier just to type "man route" then page down.

is the added complexity really worth it? we must have a ton of pages
with lists explaining flags. like

man -Otag=D ps

that doesn;t work either.

jmc

> Route flags that now produce an already existing tag don't conflict, i.e.
> ":tT" first shows
>  -T rtable
>  Select an alternate routing table to modify or query.  The
> and then on second "t"
>TRTF_MPLS MPLS route.
> 
> 
> OK?
> 
> Index: route.8
> ===
> RCS file: /cvs/src/sbin/route/route.8,v
> retrieving revision 1.117
> diff -u -p -r1.117 route.8
> --- route.8   18 Mar 2023 11:44:53 -  1.117
> +++ route.8   5 Apr 2023 12:56:12 -
> @@ -401,27 +401,27 @@ Within the output of
>  the "Flags" column indicates what flags are set on the route.
>  The mapping between letters and flags is:
>  .Bl -column "1" "RTF_BLACKHOLE" "Protocol specific routing flag #1."
> -.It 1 Ta Dv RTF_PROTO1 Ta "Protocol specific routing flag #1."
> -.It 2 Ta Dv RTF_PROTO2 Ta "Protocol specific routing flag #2."
> -.It 3 Ta Dv RTF_PROTO3 Ta "Protocol specific routing flag #3."
> -.It B Ta Dv RTF_BLACKHOLE Ta "Just discard packets."
> -.It b Ta Dv RTF_BROADCAST Ta "Correspond to a local broadcast address."
> -.It C Ta Dv RTF_CLONING Ta "Generate new routes on use."
> -.It c Ta Dv RTF_CLONED Ta "Cloned routes (generated from RTF_CLONING)."
> -.It D Ta Dv RTF_DYNAMIC Ta "Created dynamically (by redirect)."
> -.It G Ta Dv RTF_GATEWAY Ta "Dest requires forwarding by intermediary."
> -.It H Ta Dv RTF_HOST Ta "Host entry (net otherwise)."
> -.It h Ta Dv RTF_CACHED Ta "Referenced by gateway route."
> -.It L Ta Dv RTF_LLINFO Ta "Valid protocol to link address translation."
> -.It l Ta Dv RTF_LOCAL Ta "Correspond to a local address."
> -.It M Ta Dv RTF_MODIFIED Ta "Modified dynamically (by redirect)."
> -.It m Ta Dv RTF_MULTICAST Ta "Correspond to a multicast address."
> -.It n Ta Dv RTF_CONNECTED Ta "Interface route."
> -.It P Ta Dv RTF_MPATH Ta "Multipath route."
> -.It R Ta Dv RTF_REJECT Ta "Host or net unreachable."
> -.It S Ta Dv RTF_STATIC Ta "Manually added."
> -.It T Ta Dv RTF_MPLS Ta "MPLS route."
> -.It U Ta Dv RTF_UP Ta "Route usable."
> +.It Dv 1 Ta Dv RTF_PROTO1 Ta "Protocol specific routing flag #1."
> +.It Dv 2 Ta Dv RTF_PROTO2 Ta "Protocol specific routing flag #2."
> +.It Dv 3 Ta Dv RTF_PROTO3 Ta "Protocol specific routing flag #3."
> +.It Dv B Ta Dv RTF_BLACKHOLE Ta "Just discard packets."
> +.It Dv b Ta Dv RTF_BROADCAST Ta "Correspond to a local broadcast address."
> +.It Dv C Ta Dv RTF_CLONING Ta "Generate new routes on use."
> +.It Dv c Ta Dv RTF_CLONED Ta "Cloned routes (generated from RTF_CLONING)."
> +.It Dv D Ta Dv RTF_DYNAMIC Ta "Created dynamically (by redirect)."
> +.It Dv G Ta Dv RTF_GATEWAY Ta "Dest requires forwarding by intermediary."
> +.It Dv H Ta Dv RTF_HOST Ta "Host entry (net otherwise)."
> +.It Dv h Ta Dv RTF_CACHED Ta "Referenced by gateway route."
> +.It Dv L Ta Dv RTF_LLINFO Ta "Valid protocol to link address translation."
> +.It Dv l Ta Dv RTF_LOCAL Ta "Correspond to a local address."
> +.It Dv M Ta Dv RTF_MODIFIED Ta "Modified dynamically (by redirect)."
> +.It Dv m Ta Dv RTF_MULTICAST Ta "Correspond to a multicast address."
> +.It Dv n Ta Dv RTF_CONNECTED Ta "Interface route."
> +.It Dv P Ta Dv RTF_MPATH Ta "Multipath route."
> +.It Dv R Ta Dv RTF_REJECT Ta "Host or net unreachable."
> +.It Dv S Ta Dv RTF_STATIC Ta "Manually added."
> +.It Dv T Ta Dv RTF_MPLS Ta "MPLS route."
> +.It Dv U Ta Dv RTF_UP Ta "Route usable."
>  .El
>  .Pp
>  .It Xo
> 



Re: tc_init.9: misc. cleanup

2023-03-29 Thread Jason McIntyre
On Tue, Mar 28, 2023 at 07:26:56PM -0500, Scott Cheloha wrote:
> I would like to spruce up this manpage.
> 
> - Try to describe what kern_tc.c does more completely and a bit
>   more plainly.
> 
> - Mention *all* the requirements.  Try to describe the rollover
>   margin in plainer language.
> 
> - Revise field descriptions for struct timecounter.  No need to
>   mention fields the driver doesn't need to initialize.  Document
>   the new-ish tc_user field.
> 
> - Add a CONTEXT section.
> 
> - In SEE ALSO, switch to an https URI on the main freebsd.org
>   website.
> 
> - In HISTORY, note that the code first appeared in FreeBSD 3.0.
>   It was later ported to OpenBSD for the 3.6 release.
> 
> - Add an AUTHORS section.
> 

hi.

looks good to me. ok.
jmc

> Index: tc_init.9
> ===
> RCS file: /cvs/src/share/man/man9/tc_init.9,v
> retrieving revision 1.11
> diff -u -p -r1.11 tc_init.9
> --- tc_init.9 4 Feb 2023 19:19:36 -   1.11
> +++ tc_init.9 29 Mar 2023 00:21:27 -
> @@ -1,6 +1,7 @@
> -.\"  $OpenBSD: tc_init.9,v 1.11 2023/02/04 19:19:36 cheloha Exp $
> +.\"  $OpenBSD: tc_init.9,v 1.10 2023/01/17 10:10:11 jsg Exp $
>  .\"
>  .\" Copyright (c) 2004 Alexander Yurchenko 
> +.\" Copyright (c) 2023 Scott Cheloha 
>  .\"
>  .\" Permission to use, copy, modify, and distribute this software for any
>  .\" purpose with or without fee is hereby granted, provided that the above
> @@ -14,83 +15,109 @@
>  .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
>  .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  .\"
> -.Dd $Mdocdate: February 4 2023 $
> +.Dd $Mdocdate: January 17 2023 $
>  .Dt TC_INIT 9
>  .Os
>  .Sh NAME
>  .Nm tc_init
> -.Nd machine-independent binary timescale
> +.Nd timecounting subsystem
>  .Sh SYNOPSIS
>  .In sys/timetc.h
>  .Ft void
>  .Fn tc_init "struct timecounter *tc"
>  .Sh DESCRIPTION
> -The timecounter interface is a machine-independent implementation
> -of a binary timescale using whatever hardware support is at hand
> -for tracking time.
> +The
> +.Sy timecounting
> +subsystem implements a uniform interface to timekeeping hardware,
> +measures the passage of time,
> +and implements the kernel's software clocks
> +.Po see
> +.Xr microtime 9
> +for details
> +.Pc .
>  .Pp
> -A timecounter is a binary counter which has two properties:
> -.Bl -bullet -offset indent
> +A hardware clock is suitable for counting time if it meets the following
> +requirements:
> +.Bl -enum -offset indent
> +.It
> +It is a binary counter.
> +.It
> +It advances at a fixed, known frequency.
> +.It
> +Its count is synchronized between all CPUs on the system.
>  .It
> -it runs at a fixed, known frequency
> +It continues counting when it rolls over.
>  .It
> -it has sufficient bits to not roll over in less than approximately
> -max(2 msec, 2/HZ seconds) (the value 2 here is really 1 + delta, for some
> -indeterminate value of delta)
> +If
> +.Xr hz 9
> +is less than or equal to one millisecond,
> +the counter does not roll over in less than two milliseconds.
> +If
> +.Xr hz 9
> +exceeds one millisecond,
> +the counter does not roll over in less than
> +.Pq 2 / Va hz
> +seconds.
>  .El
>  .Pp
> -The interface between the hardware which implements a timecounter and the
> -machine-independent code which uses this to keep track of time is a
> +Hardware clocks are described with a
>  .Va timecounter
>  structure:
>  .Bd -literal -offset indent
>  struct timecounter {
> - timecounter_get_t   *tc_get_timecount;
> - u_int   tc_counter_mask;
> - u_int64_t   tc_frequency;
> - char*tc_name;
> - int tc_quality;
> - void*tc_priv;
> - struct timecounter  *tc_next;
> -}
> + u_int (*tc_get_timecount)(struct timecounter *);
> + u_int tc_counter_mask;
> + u_int64_t tc_frequency;
> + char *tc_name;
> + int tc_quality;
> + void *tc_priv;
> + u_int tc_user;
> +};
>  .Ed
> -.Pp
> -The fields of the
> -.Va timecounter
> -structure are described below.
>  .Bl -tag -width indent
>  .It Ft u_int Fn (*tc_get_timecount) "struct timecounter *"
> -This function reads the counter.
> -It is not required to mask any unimplemented bits out, as long as they
> -are constant.
> +Reads the hardware clock and returns its count.
> +Any unimplemented bits only need to be masked if they are not constant.
> +If the counter is larger than 32 bits,
> +this function must return a 32-bit subset.
> +The subsystem requires an upward count;
> +downward counts must be inverted before they are returned.
>  .It Va tc_counter_mask
> -This mask should mask off any unimplemented bits.
> +The mask of implemented bits.
> +Used to discard unimplemented bits from
> +.Fn tc_get_timecount .
>  .It Va tc_frequency
> -Frequency of the counter in Hz.
> +The counter's fixed frequency.
>  .It Va tc_name
> -Name of the 

Re: route.8: add back command tags

2023-03-07 Thread Jason McIntyre
my fault. please fix as needed. thanks,
jmc

On 7 March 2023 09:22:31 GMT, Klemens Nanni  wrote:
>http://man.openbsd.org/OpenBSD-7.2./route.8#add jumps to `add's definition,
>http://man.openbsd.org/OpenBSD-current/route.8#add does not.
>
>Probably lost in the recent reshuffle.
>Restore ":t add", etc. in the manual pager.
>
>OK?
>
>Index: route.8
>===
>RCS file: /cvs/src/sbin/route/route.8,v
>retrieving revision 1.113
>diff -u -p -r1.113 route.8
>--- route.83 Mar 2023 08:08:15 -   1.113
>+++ route.87 Mar 2023 09:18:35 -
>@@ -87,6 +87,7 @@ The commands are as follows:
> .Nm route
> .Op Fl dnqtv
> .Op Fl T Ar rtable
>+.Tg
> .Cm add
> .Op Ar modifier
> .Ar destination
>@@ -96,6 +97,7 @@ The commands are as follows:
> .Nm route
> .Op Fl dnqtv
> .Op Fl T Ar rtable
>+.Tg
> .Cm change
> .Op Ar modifier
> .Ar destination
>@@ -259,6 +261,8 @@ Note that priority 1 is reserved for ker
> .Nm route
> .Op Fl dnqtv
> .Op Fl T Ar rtable
>+.Tg delete
>+.Tg
> .Cm del Ns Op Cm ete
> .Ar destination
> .Op Fl priority Ar n
>@@ -273,6 +277,7 @@ and/or a gateway.
> .It Xo
> .Nm route
> .Op Fl T Ar rtable
>+.Tg
> .Cm exec
> .Op Ar command ...
> .Xc
>@@ -285,6 +290,7 @@ option.
> .Nm route
> .Op Fl nqv
> .Op Fl T Ar rtable
>+.Tg
> .Cm flush
> .Op Ar family
> .Op Fl iface Ar ifname
>@@ -304,6 +310,7 @@ modifiers.
> .Nm route
> .Op Fl nv
> .Op Fl T Ar rtable
>+.Tg
> .Cm get
> .Ar destination
> .Op Fl priority Ar n
>@@ -320,6 +327,7 @@ and/or a gateway.
> .Nm
> .Op Fl n
> .Op Fl T Ar rtable
>+.Tg
> .Cm monitor
> .Op Ar family
> .Op Fl iface
>@@ -338,6 +346,7 @@ modifier.
> .Ic route
> .Op Fl dtv
> .Op Fl T Ar rtable
>+.Tg
> .Cm nameserver
> .Ar interface
> .Op Ar address ...
>@@ -353,6 +362,7 @@ a request to remove the nameservers for 
> .Nm route
> .Op Fl nv
> .Op Fl T Ar rtable
>+.Tg
> .Cm show
> .Op Ar family
> .Op Fl gateway
>@@ -415,6 +425,7 @@ The mapping between letters and flags is
> .It Xo
> .Ic route
> .Op Fl T Ar rtable
>+.Tg
> .Cm sourceaddr
> .Op Fl inet Ns | Ns Fl inet6
> .Op Fl ifp Ar ifname
>


Re: aucat -> sndiod in intro(3) manual page

2023-02-20 Thread Jason McIntyre
On Mon, Feb 20, 2023 at 02:36:10PM +0100, David Demelier wrote:
> Hi,
> 
> Just fix sndiod reference rather than aucat to sio_open in intro(3).
> 

fixed, thanks.
jmc

> Index: share/man/man3/intro.3
> ===
> RCS file: /cvs/src/share/man/man3/intro.3,v
> retrieving revision 1.96
> diff -u -r1.96 intro.3
> --- share/man/man3/intro.310 Jun 2021 13:13:38 -  1.96
> +++ share/man/man3/intro.320 Feb 2023 13:33:40 -
> @@ -332,7 +332,7 @@
>  Library for
>  .Xr audio 4
>  hardware and the
> -.Xr aucat 1
> +.Xr sndiod 8
>  audio server.
>  See
>  .Xr sio_open 3 .
> 



Re: pinsyscall.2: Add a missing period

2023-02-18 Thread Jason McIntyre
On Sat, Feb 18, 2023 at 08:25:48AM -0500, Josiah Frentsos wrote:
> Index: pinsyscall.2
> ===
> RCS file: /cvs/src/lib/libc/sys/pinsyscall.2,v
> retrieving revision 1.1
> diff -u -p -r1.1 pinsyscall.2
> --- pinsyscall.2  16 Feb 2023 04:43:54 -  1.1
> +++ pinsyscall.2  18 Feb 2023 13:13:39 -
> @@ -54,7 +54,7 @@ that system call must be entered from, a
>  entry instruction to perform the specified
>  .Va syscall
>  from a different address range will deliver
> -Dv SIGABRT .
> +.Dv SIGABRT .
>  .Sh RETURN VALUES
>  .Rv -std
>  .Sh ERRORS
> 

fixed, thanks.
jmc



Re: sem_*.3: Use Xr where appropriate

2023-02-11 Thread Jason McIntyre
On Sat, Feb 11, 2023 at 10:00:15AM -0500, Josiah Frentsos wrote:
> Index: sem_destroy.3
> ===

committed these, thanks.
jmc

> RCS file: /cvs/src/lib/libpthread/man/sem_destroy.3,v
> retrieving revision 1.6
> diff -u -p -r1.6 sem_destroy.3
> --- sem_destroy.3 5 Jun 2013 03:44:50 -   1.6
> +++ sem_destroy.3 11 Feb 2023 14:50:35 -
> @@ -47,7 +47,7 @@ After a successful call to
>  .Fn sem_destroy ,
>  .Fa sem
>  is unusable until re-initialized by another call to
> -.Fn sem_init .
> +.Xr sem_init 3 .
>  .Sh RETURN VALUES
>  .Rv -std sem_destroy
>  .Sh ERRORS
> Index: sem_init.3
> ===
> RCS file: /cvs/src/lib/libpthread/man/sem_init.3,v
> retrieving revision 1.7
> diff -u -p -r1.7 sem_init.3
> --- sem_init.36 Apr 2021 19:59:32 -   1.7
> +++ sem_init.311 Feb 2023 14:50:35 -
> @@ -54,21 +54,21 @@ Following a successful call to
>  .Fn sem_init ,
>  .Fa sem
>  can be used as an argument in subsequent calls to
> -.Fa sem_wait ,
> -.Fa sem_trywait ,
> -.Fa sem_post ,
> +.Xr sem_wait 3 ,
> +.Xr sem_trywait 3 ,
> +.Xr sem_post 3 ,
>  and
> -.Fa sem_destroy .
> +.Xr sem_destroy 3 .
>  .Fa sem
>  is no longer valid after a successful call to
> -.Fa sem_destroy .
> +.Xr sem_destroy 3 .
>  .Sh RETURN VALUES
>  .Rv -std sem_init
>  .Sh ERRORS
>  It is an error to call
> -.Fn sem_destroy
> +.Xr sem_destroy 3
>  on a named semaphore created by
> -.Fn sem_open .
> +.Xr sem_open 3 .
>  .Pp
>  .Fn sem_init
>  will fail if:
> Index: sem_open.3
> ===
> RCS file: /cvs/src/lib/libpthread/man/sem_open.3,v
> retrieving revision 1.11
> diff -u -p -r1.11 sem_open.3
> --- sem_open.322 Sep 2015 08:43:12 -  1.11
> +++ sem_open.311 Feb 2023 14:50:35 -
> @@ -62,7 +62,7 @@ to indicate an error.
>  It is an error to call
>  .Fn sem_close
>  with an unnamed semaphore or to call
> -.Fn sem_destroy
> +.Xr sem_destroy 3
>  with a named semaphore.
>  .Pp
>  .Fn sem_open
> Index: sem_post.3
> ===
> RCS file: /cvs/src/lib/libpthread/man/sem_post.3,v
> retrieving revision 1.5
> diff -u -p -r1.5 sem_post.3
> --- sem_post.35 Jun 2013 03:44:50 -   1.5
> +++ sem_post.311 Feb 2023 14:50:35 -
> @@ -47,7 +47,7 @@ If there are threads blocked on the sema
>  .Fn sem_post
>  is called, then the highest priority thread that has been blocked the 
> longest on
>  the semaphore will be allowed to return from
> -.Fn sem_wait .
> +.Xr sem_wait 3 .
>  .Pp
>  .Fn sem_post
>  is signal-reentrant and may be called within signal handlers.
> 



Re: rdsetroot.8: sync synopsis with usage, improve wording

2023-01-20 Thread Jason McIntyre
ok by me.
jmc

On 20 January 2023 17:00:37 GMT, Klemens Nanni  wrote:
>Alright, sorry for the noise.
>
>Is this minimal sync plus stdout mention fine?
>
>Index: rdsetroot.8
>===
>RCS file: /cvs/src/usr.sbin/rdsetroot/rdsetroot.8,v
>retrieving revision 1.2
>diff -u -p -r1.2 rdsetroot.8
>--- rdsetroot.85 Apr 2019 21:44:32 -   1.2
>+++ rdsetroot.820 Jan 2023 16:58:56 -
>@@ -45,6 +45,11 @@ Debug.
> Rather than inserting, extract the
> .Ar disk.fs
> image.
>+If
>+.Ar disk.fs
>+is not speficied,
>+.Nm
>+writes to standard output.
> The disk can be made accessible using
> .Xr vnconfig 8 ,
> filesystems can be manipulated, and finally re-inserted into the RAMDISK 
> kernel.
>Index: rdsetroot.c
>===
>RCS file: /cvs/src/usr.sbin/rdsetroot/rdsetroot.c,v
>retrieving revision 1.3
>diff -u -p -r1.3 rdsetroot.c
>--- rdsetroot.c24 Oct 2021 21:24:19 -  1.3
>+++ rdsetroot.c20 Jan 2023 16:58:58 -
>@@ -294,6 +294,6 @@ usage(void)
> {
>   extern char *__progname;
> 
>-  fprintf(stderr, "usage: %s [-dx] bsd [fs]\n", __progname);
>+  fprintf(stderr, "usage: %s [-dx] kernel [disk.fs]\n", __progname);
>   exit(1);
> }
>


Re: rdsetroot.8: sync synopsis with usage, improve wording

2023-01-20 Thread Jason McIntyre
On Fri, Jan 20, 2023 at 12:35:05PM +, Klemens Nanni wrote:
> 19.01.2023 19:11, Jason McIntyre ??:
> > On Thu, Jan 19, 2023 at 06:50:14PM +, Klemens Nanni wrote:
> >>$ man -h rdsetroot
> >>rdsetroot [-dx] kernel [disk.fs]
> >> vs.
> >>$ rdsetroot
> >>usage: rdsetroot [-dx] bsd [fs]
> >>
> > 
> > i have to say i think the man page has better argument names, but i've
> > nothing against your changes. just as long as they match.
> 
> Either way is fine, just let them match.
> 
> >> Clarify that -x uses stdout (could be a default file like ktrace(1) does)
> >> and switch 'standard in/output' to more common '.Va stdin/out' like the
> >> related vnconfig(8) does.
> >>
> > 
> > i'm fine with your diff, but i think that "reads from standard input" is
> > much easier to understand than the change you propose.
> 
> Sure, new version with both points incorporated.
> 
> Feedback? OK?
> 
> > 
> > jmc
> > 
> >> Explaining how disk images can round trip through rdsetroot and vnconfig
> >> is vaguely useful, imho, even less so in the description of -x, so briefly
> >> mention the relation and let readers follow the reference for more.
> 
> 
> Index: rdsetroot.8
> ===
> RCS file: /cvs/src/usr.sbin/rdsetroot/rdsetroot.8,v
> retrieving revision 1.2
> diff -u -p -r1.2 rdsetroot.8
> --- rdsetroot.8   5 Apr 2019 21:44:32 -   1.2
> +++ rdsetroot.8   20 Jan 2023 12:33:31 -
> @@ -24,30 +24,29 @@
>  .Nm rdsetroot
>  .Op Fl dx
>  .Ar kernel
> -.Op Ar disk.fs
> +.Op Ar disk

well, disk.fs and your original proposal (fs) both hinted that you want
a filesystem. i'm less sure about "disk". you aren;t concerned about
that? i really don;t see an issue with how it is now.

>  .Sh DESCRIPTION
>  The
>  .Nm
> -utility inserts the file
> -.Ar disk.fs
> -into the reserved space inside a RAMDISK kernel.
> +utility inserts the disk image
> +.Ar disk
> +into the reserved space inside the RAMDISK kernel
> +.Ar bsd .

if you stick with "kernel" you'll need to make that change here too.

jmc

>  If
> -.Ar disk.fs
> -is not specified,
> -.Nm
> -reads from standard input.
> +.Ar disk
> +is not specified, standard input is used.
> +Disk images can be used with
> +.Xr vnconfig 8 .
>  .Pp
>  The options are as follows:
>  .Bl -tag -width Ds
>  .It Fl d
>  Debug.
>  .It Fl x
> -Rather than inserting, extract the
> -.Ar disk.fs
> -image.
> -The disk can be made accessible using
> -.Xr vnconfig 8 ,
> -filesystems can be manipulated, and finally re-inserted into the RAMDISK 
> kernel.
> +Extract the disk image.
> +If
> +.Ar disk
> +is not specified, standard output is used.
>  .El
>  .Sh SEE ALSO
>  .Xr config 8 ,
> Index: rdsetroot.c
> ===
> RCS file: /cvs/src/usr.sbin/rdsetroot/rdsetroot.c,v
> retrieving revision 1.3
> diff -u -p -r1.3 rdsetroot.c
> --- rdsetroot.c   24 Oct 2021 21:24:19 -  1.3
> +++ rdsetroot.c   20 Jan 2023 12:33:33 -
> @@ -294,6 +294,6 @@ usage(void)
>  {
>   extern char *__progname;
>  
> - fprintf(stderr, "usage: %s [-dx] bsd [fs]\n", __progname);
> + fprintf(stderr, "usage: %s [-dx] kernel [disk]\n", __progname);
>   exit(1);
>  }
> 



Re: rdsetroot.8: sync synopsis with usage, improve wording

2023-01-19 Thread Jason McIntyre
On Thu, Jan 19, 2023 at 06:50:14PM +, Klemens Nanni wrote:
>   $ man -h rdsetroot
>   rdsetroot [-dx] kernel [disk.fs]
> vs.
>   $ rdsetroot
>   usage: rdsetroot [-dx] bsd [fs]
> 

i have to say i think the man page has better argument names, but i've
nothing against your changes. just as long as they match.

> Clarify that -x uses stdout (could be a default file like ktrace(1) does)
> and switch 'standard in/output' to more common '.Va stdin/out' like the
> related vnconfig(8) does.
> 

i'm fine with your diff, but i think that "reads from standard input" is
much easier to understand than the change you propose.

jmc

> Explaining how disk images can round trip through rdsetroot and vnconfig
> is vaguely useful, imho, even less so in the description of -x, so briefly
> mention the relation and let readers follow the reference for more.
> 
> Feedback? Objection? OK?
> 
> Index: rdsetroot.8
> ===
> RCS file: /cvs/src/usr.sbin/rdsetroot/rdsetroot.8,v
> retrieving revision 1.2
> diff -u -p -r1.2 rdsetroot.8
> --- rdsetroot.8   5 Apr 2019 21:44:32 -   1.2
> +++ rdsetroot.8   19 Jan 2023 18:39:03 -
> @@ -23,31 +23,34 @@
>  .Sh SYNOPSIS
>  .Nm rdsetroot
>  .Op Fl dx
> -.Ar kernel
> -.Op Ar disk.fs
> +.Ar bsd
> +.Op Ar fs
>  .Sh DESCRIPTION
>  The
>  .Nm
> -utility inserts the file
> -.Ar disk.fs
> -into the reserved space inside a RAMDISK kernel.
> +utility inserts the disk image
> +.Ar fs
> +into the reserved space inside the RAMDISK kernel
> +.Ar bsd .
>  If
> -.Ar disk.fs
> +.Ar fs
>  is not specified,
> -.Nm
> -reads from standard input.
> +.Va stdin
> +is used.
> +Disk images can be used with
> +.Xr vnconfig 8 .
>  .Pp
>  The options are as follows:
>  .Bl -tag -width Ds
>  .It Fl d
>  Debug.
>  .It Fl x
> -Rather than inserting, extract the
> -.Ar disk.fs
> -image.
> -The disk can be made accessible using
> -.Xr vnconfig 8 ,
> -filesystems can be manipulated, and finally re-inserted into the RAMDISK 
> kernel.
> +Extract the disk image.
> +If
> +.Ar fs
> +is not specified,
> +.Va stdout
> +is used.
>  .El
>  .Sh SEE ALSO
>  .Xr config 8 ,
> 



Re: make: arguments can have multiple variable assignments

2023-01-17 Thread Jason McIntyre
yep, ok by me.
jmc

On 17 January 2023 12:03:58 GMT, Klemens Nanni  wrote:
>17.01.2023 06:44, Jason McIntyre пишет:
>> seems correct. posix spec shows "..." too.
>
>Right, I didn't dig that up yet.
>
>In that case:  OK?
>


Re: remove elansc(4)

2023-01-16 Thread Jason McIntyre
On Tue, Jan 17, 2023 at 04:12:10PM +1100, Jonathan Gray wrote:
> AMD Elan SC520 (found on soekris net45xx) has a 486 class processor
> We require at least a 586/pentium class processor
> 

if you do, there's a little cleanup:

/usr/src/share/man/man4/gpio.4:.Cd "gpio* at elansc?" Pq i386
/usr/src/share/man/man4/pci.4:.It Xr elansc 4
/usr/src/share/man/man9/tc_init.9:.Xr elansc 4 ,

jmc



Re: make: arguments can have multiple variable assignments

2023-01-16 Thread Jason McIntyre
On Mon, Jan 16, 2023 at 10:03:03PM +, Klemens Nanni wrote:
> SYNOPSIS and usage say [NAME=value] while multiple assigments are fine:
> 
>   $ make -p FOO=1 BAR=2 | grep -e^FOO -e^BAR
>   BAR  = 2
>   FOO  = 1
> 
> I'm sure ports(7) wouldn't work if only one was accepted, hence it suprises
> me that none of the BSDs document it with triple dots, like targets.
> 
> Am I missing some detail here or is this just a very old oversight?
> 

seems correct. posix spec shows "..." too.
jmc

> 
> Index: main.c
> ===
> RCS file: /cvs/src/usr.bin/make/main.c,v
> retrieving revision 1.128
> diff -u -p -r1.128 main.c
> --- main.c4 Dec 2022 23:50:48 -   1.128
> +++ main.c16 Jan 2023 21:52:48 -
> @@ -891,7 +891,7 @@ usage()
>   (void)fprintf(stderr,
>  "usage: make [-BeiknpqrSst] [-C directory] [-D variable] [-d flags] [-f 
> mk]\n\
>   [-I directory] [-j max_processes] [-m directory] [-V variable]\n\
> - [NAME=value] [target ...]\n");
> + [NAME=value ...] [target ...]\n");
>   exit(2);
>  }
>  
> Index: make.1
> ===
> RCS file: /cvs/src/usr.bin/make/make.1,v
> retrieving revision 1.138
> diff -u -p -r1.138 make.1
> --- make.128 Dec 2022 13:00:57 -  1.138
> +++ make.116 Jan 2023 21:57:18 -
> @@ -47,7 +47,7 @@
>  .Op Fl j Ar max_processes
>  .Op Fl m Ar directory
>  .Op Fl V Ar variable
> -.Op Ar NAME Ns = Ns Ar value
> +.Op Ar NAME Ns = Ns Ar value ...
>  .Bk -words
>  .Op Ar target ...
>  .Ek
> 



Re: Suggested change to ports.7 man page

2023-01-04 Thread Jason McIntyre
On Wed, Jan 04, 2023 at 10:12:00AM +, Stuart Henderson wrote:
>I don't think this helps.
>It's the same for clean, update-patches, install, update-plist,
>port-lib-depends-check, [...] and we already have "and of course, use
>the same settings for the subsequent invocations of make" in the
>section showing how to work with flavours.
>--

thanks, stuart. i won;t pursue this any further.
jmc

>  Sent from a phone, apologies for poor formatting.
>    On 4 January 2023 07:28:39 Jason McIntyre  wrote:
> 
>On Mon, Jan 02, 2023 at 07:00:27AM -0500, Jon Fineman wrote:
> 
>I was trying to make clean a port I was updating and it wasn't clear
> 
>to me that I should be adding the FLAVOR variable to the make line to
> 
>clean the correct build.
> 
>My suggested change below might help other people.
> 
>Jon
> 
>anyone?
> 
>jmc
> 
>Index: ports.7
> 
>===
> 
>RCS file: /cvs/src/share/man/man7/ports.7,v
> 
>retrieving revision 1.130
> 
>diff -u -p -r1.130 ports.7
> 
>--- ports.7 20 Jul 2022 16:37:50 - 1.130
> 
>+++ ports.7 2 Jan 2023 11:38:27 -
> 
>@@ -324,6 +324,9 @@ This does not recurse to dependencies un
> 
>.Ev CLEANDEPENDS
> 
>is defined to
> 
>.Dv Yes .
> 
>+To clean a build of
> 
>+.Cm FLAVORS
> 
>+you need to specify all of the flavors you built with.
> 
>.It Cm distclean
> 
>Remove the port's distfile(s).
> 
>This does not recurse to dependencies.



Re: grep.1: Use Fl for -print0

2023-01-03 Thread Jason McIntyre
On Tue, Jan 03, 2023 at 11:55:34AM -0500, Josiah Frentsos wrote:
> Index: grep.1
> ===
> RCS file: /cvs/src/usr.bin/grep/grep.1,v
> retrieving revision 1.51
> diff -u -p -r1.51 grep.1
> --- grep.126 Jun 2022 10:57:36 -  1.51
> +++ grep.13 Jan 2023 16:52:05 -
> @@ -304,7 +304,7 @@ file name.
>  This option makes the output unambiguous, even in the presence of file
>  names containing unusual characters like newlines.
>  This is similar to the
> -.Ar -print0
> +.Fl print0
>  option in
>  .Xr find 1 .
>  .El
> 

fair enough. find(1) itself uses "Ic", but i suppose that makes sense for
find.1, not grep.1. i also changed the description of print0 from
"option" to "primary", since that is the language find(1) uses.

jmc



Re: [PATCH v3 3/3] script(1): fix exit status wording

2023-01-03 Thread Jason McIntyre
On Tue, Jan 03, 2023 at 03:57:20PM +0100, ?? wrote:
> ---
> Resend after a year; clean rebase. Keep me in CC.
> 
> Failure-of-script status unchanged at 1 after complaints for v2.
> 
>  usr.bin/script/script.1 | 6 ++
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/usr.bin/script/script.1 b/usr.bin/script/script.1
> index aa8bb2790..aa55d43af 100644
> --- a/usr.bin/script/script.1
> +++ b/usr.bin/script/script.1
> @@ -80,10 +80,8 @@ or control-D
>  .Pq Ql ^D
>  will exit most interactive shells).
>  .Nm
> -will exit with the status of 0 unless any of its child
> -processes fail, in which case,
> -.Nm
> -will return 1.
> +will exit with the status of the shell,
> +or 1 if it couldn't execute it.
>  .Pp
>  Certain interactive commands, such as
>  .Xr vi 1 ,
> -- 
> 2.30.2


hi.

can you provide some examples showing that your proposed text is correct
and the current text wrong?

jmc



Re: Suggested change to ports.7 man page

2023-01-03 Thread Jason McIntyre
On Mon, Jan 02, 2023 at 07:00:27AM -0500, Jon Fineman wrote:
> I was trying to make clean a port I was updating and it wasn't clear 
> to me that I should be adding the FLAVOR variable to the make line to 
> clean the correct build.
> 
> My suggested change below might help other people.
> 
> Jon
> 

anyone?
jmc

> 
> 
> Index: ports.7
> ===
> RCS file: /cvs/src/share/man/man7/ports.7,v
> retrieving revision 1.130
> diff -u -p -r1.130 ports.7
> --- ports.7   20 Jul 2022 16:37:50 -  1.130
> +++ ports.7   2 Jan 2023 11:38:27 -
> @@ -324,6 +324,9 @@ This does not recurse to dependencies un
>   .Ev CLEANDEPENDS
>   is defined to
>   .Dv Yes .
> +To clean a build of
> +.Cm FLAVORS
> +you need to specify all of the flavors you built with.
>   .It Cm distclean
>   Remove the port's distfile(s).
>   This does not recurse to dependencies.
> 



Re: df.1: document that -P disables BLOCKSIZE

2022-12-31 Thread Jason McIntyre
On Sat, Dec 31, 2022 at 02:32:30PM -0700, Todd C. Miller wrote:
> Updated version.  I kept "The BLOCKSIZE environment variable" in
> the -P description since it is the first time the man page metions
> BLOCKSIZE.
> 
>  - todd
> 

certainly ok by me.
jmc

> Index: bin/df/df.1
> ===
> RCS file: /cvs/src/bin/df/df.1,v
> retrieving revision 1.48
> diff -u -p -u -r1.48 df.1
> --- bin/df/df.1   10 Aug 2016 19:46:43 -  1.48
> +++ bin/df/df.1   31 Dec 2022 21:29:50 -
> @@ -100,6 +100,9 @@ with the possibly stale statistics that 
>  .It Fl P
>  Print out information in a stricter format designed to be parsed
>  by portable scripts.
> +The
> +.Ev BLOCKSIZE
> +environment variable is ignored when this option is specified.
>  .It Fl t Ar type
>  Indicate the actions should only be taken on
>  file systems of the specified
> @@ -125,14 +128,13 @@ the last option given overrides the othe
>  .Sh ENVIRONMENT
>  .Bl -tag -width BLOCKSIZE
>  .It Ev BLOCKSIZE
> -If the environment variable
> -.Ev BLOCKSIZE
> -is set, and the
> -.Fl h
> +Display block counts in units of size
> +.Dv BLOCKSIZE .
> +Ignored if any of the
> +.Fl h , k
>  or
> -.Fl k
> -options are not specified, the block counts will be displayed in units of 
> that
> -size block.
> +.Fl P
> +options are specified.
>  .El
>  .Sh EXIT STATUS
>  .Ex -std df



Re: [v3] timeout.9: document missing interfaces, miscellaneous rewrites

2022-12-31 Thread Jason McIntyre
On Sat, Dec 31, 2022 at 11:22:22AM -0500, Scott Cheloha wrote:
> mvs@ is nudging me to realign the timeout.9 page with the state of the
> kernel.
> 
> Here is my rewrite (again).
> 

i'm losing track of what i'm reviewing! maybe just put it in and we can
adjust it as needed, if needed.

ok jmc



Re: df.1: document that -P disables BLOCKSIZE

2022-12-31 Thread Jason McIntyre
On Sat, Dec 31, 2022 at 10:54:27AM -0700, Todd C. Miller wrote:
> In POSIX mode, df(1) does not honor the BLOCKSIZE environment
> variable.
> 
> Any comments on the wording?
> 
>  - todd
> 

hi

> Index: bin/df/df.1
> ===
> RCS file: /cvs/src/bin/df/df.1,v
> retrieving revision 1.48
> diff -u -p -u -r1.48 df.1
> --- bin/df/df.1   10 Aug 2016 19:46:43 -  1.48
> +++ bin/df/df.1   31 Dec 2022 17:50:39 -
> @@ -100,6 +100,9 @@ with the possibly stale statistics that 
>  .It Fl P
>  Print out information in a stricter format designed to be parsed
>  by portable scripts.
> +The
> +.Ev BLOCKSIZE
> +environment variable is ignored when this option is specified.

you could shorten it to "BLOCKSIZE is ignored...". up to you.

>  .It Fl t Ar type
>  Indicate the actions should only be taken on
>  file systems of the specified
> @@ -127,11 +130,12 @@ the last option given overrides the othe
>  .It Ev BLOCKSIZE
>  If the environment variable
>  .Ev BLOCKSIZE
> -is set, and the
> -.Fl h
> +is set, and neither of the

theoretically, "neither" refers to two items. so maybe "none of"?

> +.Fl h ,
> +.Fl k ,
>  or
> -.Fl k
> -options are not specified, the block counts will be displayed in units of 
> that
> +.Fl P
> +options are specified, the block counts will be displayed in units of that
>  size block.
>  .El
>  .Sh EXIT STATUS
> 

again we could shorten it. the BLOCKSIZE text already looks a bit weird:
the first clause is just redundant, and the emphasis seems to be how to
avoid it. maybe:

Display block counts in units of size
.Dv BLOCKSIZE .
Ignored if any of the
.Fl h , k
or
.Fl P
options are specified.

sth like that?

jmc



Re: [patch(es)] fix a few typos in /src

2022-12-28 Thread Jason McIntyre
On Fri, Dec 23, 2022 at 10:33:43AM -0500, Paul Tagliamonte wrote:

i've finished with this diff. the usr.sbin parts i didn;t take are
listed below, along with any explanation.

jmc

Index: usr.sbin/smtpd/crypto.c
===
RCS file: /cvs/src/usr.sbin/smtpd/crypto.c,v
retrieving revision 1.10
diff -u -p -r1.10 crypto.c
--- usr.sbin/smtpd/crypto.c 14 Jun 2021 17:58:15 -  1.10
+++ usr.sbin/smtpd/crypto.c 23 Dec 2022 15:20:51 -
@@ -375,7 +375,7 @@ main(int argc, char *argv[])
/* uncomment below to provoke integrity check failure */
/*
 * fpin = fopen("/tmp/passwd.enc", "a");
-* fprintf(fpin, "borken");
+* fprintf(fpin, "broken");
 * fclose(fpin);
 */
fpin = fopen("/tmp/passwd.enc", "r");

i think it was noted already, but "bork" is a thing. i didn;t touch
this.

Index: usr.sbin/smtpd/mta_session.c
===
RCS file: /cvs/src/usr.sbin/smtpd/mta_session.c,v
retrieving revision 1.147
diff -u -p -r1.147 mta_session.c
--- usr.sbin/smtpd/mta_session.c26 Sep 2022 08:48:52 -  1.147
+++ usr.sbin/smtpd/mta_session.c23 Dec 2022 15:20:51 -
@@ -635,7 +635,7 @@ again:
else if (s->relay->secret) {
log_debug("debug: mta: %p: not using AUTH on non-TLS "
"session", s);
-   mta_error(s, "Refuse to AUTH over unsecure channel");
+   mta_error(s, "Refuse to AUTH over insecure channel");
mta_connect(s);
} else {
mta_enter_state(s, MTA_READY);

ho hum. i left this. the sense seems closer to unsecure debt than
insecure person.

Index: usr.sbin/relayd/relay_http.c
===
RCS file: /cvs/src/usr.sbin/relayd/relay_http.c,v
retrieving revision 1.83
diff -u -p -r1.83 relay_http.c
--- usr.sbin/relayd/relay_http.c23 Oct 2021 20:46:18 -  1.83
+++ usr.sbin/relayd/relay_http.c23 Dec 2022 15:20:51 -
@@ -281,7 +281,7 @@ relay_read_http(struct bufferevent *bev,
} else {
SIMPLEQ_REMOVE_HEAD(>hs_methods, hmn_entry);
request_method = hmn->hmn_method;
-   DPRINTF("%s: session %d dequeing %s", __func__,
+   DPRINTF("%s: session %d dequeuing %s", __func__,
con->se_id,
relay_httpmethod_byid(request_method));
free(hmn);
@@ -335,7 +335,7 @@ relay_read_http(struct bufferevent *bev,
goto fail;
}
hmn->hmn_method = desc->http_method;
-   DPRINTF("%s: session %d enqueing %s", __func__,
+   DPRINTF("%s: session %d enqueuing %s", __func__,
con->se_id,
relay_httpmethod_byid(hmn->hmn_method));
SIMPLEQ_INSERT_TAIL(>hs_methods, hmn, hmn_entry);

so "queuing" and "queueing" are both ok. on reflection, i think i will
tweak this one.

Index: usr.sbin/smtpd/smtpd.c
===
RCS file: /cvs/src/usr.sbin/smtpd/smtpd.c,v
retrieving revision 1.343
diff -u -p -r1.343 smtpd.c
--- usr.sbin/smtpd/smtpd.c  18 Feb 2022 16:57:36 -  1.343
+++ usr.sbin/smtpd/smtpd.c  23 Dec 2022 15:20:51 -
@@ -1802,7 +1802,7 @@ parent_forward_open(char *username, char
}
 
if (!secure_file(fd, pathname, directory, uid, 1)) {
-   log_warnx("warn: smtpd: %s: unsecure file", pathname);
+   log_warnx("warn: smtpd: %s: insecure file", pathname);
close(fd);
return -1;
}

as above

jmc



Re: [patch(es)] fix a few typos in /src

2022-12-27 Thread Jason McIntyre
On Thu, Dec 22, 2022 at 10:49:06PM -0500, Paul Tagliamonte wrote:
> 
> Updated patch attached with your feedback, thank you Crystal
> 

i've committed the bits of this that i though correct. i'll note below
anything rejected from the /lib parts. i've finished with this diff now.

jmc

> Index: lib/libc/sys/Makefile.inc
> ===
> RCS file: /cvs/src/lib/libc/sys/Makefile.inc,v
> retrieving revision 1.167
> diff -u -p -r1.167 Makefile.inc
> --- lib/libc/sys/Makefile.inc 19 Dec 2022 18:13:50 -  1.167
> +++ lib/libc/sys/Makefile.inc 22 Dec 2022 21:14:09 -
> @@ -23,7 +23,7 @@ SRCS+=  ptrace.c semctl.c \
>  # stack protector helper functions
>  SRCS+=   stack_protector.c
>  
> -# cancelation details
> +# cancellation details
>  SRCS+=   canceled.c
>  
>  # syscalls that would be normal...except for cancellation or SIGTHR

i've not taken cancelation->cancellation parts. US english seems to
prefer cancel/canceling, and i couldn;t convince myself that this change
was correct. so i've not taken it.

Index: lib/libagentx/ax.c
===
RCS file: /cvs/src/lib/libagentx/ax.c,v
retrieving revision 1.8
diff -u -p -r1.8 ax.c
--- lib/libagentx/ax.c  24 Oct 2021 17:43:38 -  1.8
+++ lib/libagentx/ax.c  22 Dec 2022 21:14:07 -
@@ -862,7 +862,7 @@ ax_varbind2string(struct ax_varbind *vb)
if (inet_ntop(PF_INET, vb->avb_data.avb_ostring.aos_string,
tmpbuf, sizeof(tmpbuf)) == NULL) {
snprintf(buf, sizeof(buf), "%s: (ipaddress)"
-   ": %s",
+   ": %s",
ax_oid2string(&(vb->avb_oid)),
strerror(errno));
break;

we have "parseable" all over the tree. the verb is "parse". i didn;t
take this.

Index: lib/libc/include/cancel.h
===
RCS file: /cvs/src/lib/libc/include/cancel.h,v
retrieving revision 1.5
diff -u -p -r1.5 cancel.h
--- lib/libc/include/cancel.h   5 Sep 2017 02:40:54 -   1.5
+++ lib/libc/include/cancel.h   22 Dec 2022 21:14:09 -
@@ -61,8 +61,8 @@ PROTO_NORMAL(_thread_canceled);
}
 
 /*
- * Enter or leave a cancelation point, optionally processing pending
- * cancelation requests.  Note that ENTER_CANCEL_POINT opens a block
+ * Enter or leave a cancellation point, optionally processing pending
+ * cancellation requests.  Note that ENTER_CANCEL_POINT opens a block
  * and LEAVE_CANCEL_POINT must close that same block.
  */
 #defineENTER_CANCEL_POINT(can_cancel)  
\

cancelation -> cancellation

Index: lib/libc/gen/errno.c
===
RCS file: /cvs/src/lib/libc/gen/errno.c,v
retrieving revision 1.6
diff -u -p -r1.6 errno.c
--- lib/libc/gen/errno.c7 May 2016 19:05:22 -   1.6
+++ lib/libc/gen/errno.c22 Dec 2022 21:14:08 -
@@ -27,7 +27,7 @@ DEF_STRONG(__errno);
  * syscall.  Rather than pay that cost for single-threaded programs,
  * the syscall stubs will invoke the tc_errnoptr callback to set errno
  * and other code will invoke the tc_tcb callback to get the TCB
- * for cancelation checks, etc.  The default callbacks will just
+ * for cancellation checks, etc.  The default callbacks will just
  * work from the cached location of the initial thread's TCB;
  * libpthread can override them to the necessary more expensive
  * versions that use __get_tcb().

cancelation -> cancellation

Index: lib/libutil/imsg_init.3
===
RCS file: /cvs/src/lib/libutil/imsg_init.3,v
retrieving revision 1.25
diff -u -p -r1.25 imsg_init.3
--- lib/libutil/imsg_init.3 19 May 2022 08:05:23 -  1.25
+++ lib/libutil/imsg_init.3 22 Dec 2022 21:14:14 -
@@ -348,7 +348,7 @@ On success
 returns a pointer to the buffer; on failure it returns NULL.
 .Pp
 .Fn ibuf_dynamic
-allocates a resizeable buffer of initial length
+allocates a resizable buffer of initial length
 .Fa len
 and maximum size
 .Fa max .

i'm fairly sure sizable and sizeable are both ok. did not take.

Index: lib/libc/db/mpool/mpool.c
===
RCS file: /cvs/src/lib/libc/db/mpool/mpool.c,v
retrieving revision 1.21
diff -u -p -r1.21 mpool.c
--- lib/libc/db/mpool/mpool.c   1 Nov 2015 03:45:28 -   1.21
+++ lib/libc/db/mpool/mpool.c   22 Dec 2022 21:14:08 -
@@ -449,7 +449,7 @@ mpool_stat(MPOOL *mp)
 
(void)fprintf(stderr, "%lu pages in the file\n", mp->npages);
(void)fprintf(stderr,
-   "page size %lu, cacheing %lu pages of %lu page max cache\n",
+   "page size %lu, caching %lu pages of %lu page max cache\n",
mp->pagesize, mp->curcache, mp->maxcache);

Re: [patch(es)] fix a few typos in /src

2022-12-27 Thread Jason McIntyre
On Fri, Dec 23, 2022 at 10:33:43AM -0500, Paul Tagliamonte wrote:
> On Fri, Dec 23, 2022 at 03:03:15PM +, Stuart Henderson wrote:
> 
> > A bunch of the files in your diff come from external upstream sources
> > which are still synced from upstream (or at least should be); patching
> > in the OpenBSD tree makes it harder to merge in updates. (including
> > at least curses, the "magic" files for file, nsd, unbound).
> 

ok, so stuart said it already, but i'm leaving out the parts of this
diff for nsd and unbound. submit those upstream, please.

i have already committed the parts to file(1) i think, so apologies if i
just made someone's life a bit tougher.

jmc



Re: [patch(es)] fix a few typos in /src

2022-12-26 Thread Jason McIntyre
On Thu, Dec 22, 2022 at 10:49:06PM -0500, Paul Tagliamonte wrote:
> Index: include/tib.h
> ===
> RCS file: /cvs/src/include/tib.h,v
> retrieving revision 1.8
> diff -u -p -r1.8 tib.h
> --- include/tib.h 14 Jul 2020 16:48:13 -  1.8
> +++ include/tib.h 22 Dec 2022 21:14:06 -
> @@ -54,7 +54,7 @@
>   *   Short-hand for TCB_TO_TIB(TCB_GET())
>   *
>   *   TIB_EXTRA_ALIGN
> - *   On TLS varaint 2 archs, what alignment is sufficient
> + *   On TLS variant 2 archs, what alignment is sufficient
>   *   for the extra space that will be used for struct pthread?
>   *
>   * The following functions are provided by either ld.so (dynamic) or
> @@ -123,7 +123,7 @@
>   *
>   *   [pthread structure]
>   *   TIB {
> - *   ...cancelation and other int-sized info...
> + *   ...cancellation and other int-sized info...
>   *   int errno
>   *   void *locale
>   *   TCB (- TCB_OFFSET) {
> @@ -169,7 +169,7 @@ struct tib {
>   *   struct pthread *thread
>   *   void *locale
>   *   int errno
> - *   ...cancelation and other int-sized info...
> + *   ...cancellation and other int-sized info...
>   *   }
>   *   [pthread structure]
>   */

i took the first hunk of this diff, but did not commit the
cancelation->cancellation part. i know that US english prefers single
'l' (canceling/canceled). i'm not 100% sure about whether this applies
to "cancellation" but decided the gain was not worth it. the intent is
clear enough.

jmc



Re: [patch(es)] fix a few typos in /src

2022-12-26 Thread Jason McIntyre
On Fri, Dec 23, 2022 at 10:33:43AM -0500, Paul Tagliamonte wrote:
> Index: usr.bin/mg/search.c
> ===
> RCS file: /cvs/src/usr.bin/mg/search.c,v
> retrieving revision 1.48
> diff -u -p -r1.48 search.c
> --- usr.bin/mg/search.c   20 Oct 2022 18:59:24 -  1.48
> +++ usr.bin/mg/search.c   23 Dec 2022 15:20:48 -
> @@ -872,8 +872,8 @@ zapuptochar(int f, int n)
>  }
>  
>  /*
> - * Prompt for a charcter and deletes from the point up to, optionally
> - * including, the first instance of that charcters.  Marks is cleared
> + * Prompt for a character and deletes from the point up to, optionally
> + * including, the first instance of that characters.  Marks is cleared
>   * afterwards.
>   */
>  int

i changed "characters" to "character" here.
jmc



Re: [patch(es)] fix a few typos in /src

2022-12-26 Thread Jason McIntyre
On Fri, Dec 23, 2022 at 10:33:43AM -0500, Paul Tagliamonte wrote:
> Index: usr.bin/make/arch.c
> ===
> RCS file: /cvs/src/usr.bin/make/arch.c,v
> retrieving revision 1.91
> diff -u -p -r1.91 arch.c
> --- usr.bin/make/arch.c   13 Jan 2020 13:54:44 -  1.91
> +++ usr.bin/make/arch.c   23 Dec 2022 15:20:48 -
> @@ -62,7 +62,7 @@
>   */
>  
>  /*
> - *   Once again, cacheing/hashing comes into play in the manipulation
> + *   Once again, caching/hashing comes into play in the manipulation
>   * of archives. The first time an archive is referenced, all of its members'
>   * headers are read and hashed and the archive closed again. All hashed
>   * archives are kept in a hash (archives) which is searched each time

hi,

i'm not taking this. i can;t convince myself that one is preferrable to
the other. do we say "ka-sh" or "ka-shay"? running for cover now... 

jmc



Re: [patch(es)] fix a few typos in /src

2022-12-26 Thread Jason McIntyre
On Fri, Dec 23, 2022 at 10:33:43AM -0500, Paul Tagliamonte wrote:
> Index: usr.bin/find/function.c
> ===
> RCS file: /cvs/src/usr.bin/find/function.c,v
> retrieving revision 1.50
> diff -u -p -r1.50 function.c
> --- usr.bin/find/function.c   23 Nov 2020 06:21:52 -  1.50
> +++ usr.bin/find/function.c   23 Dec 2022 15:20:47 -
> @@ -1396,7 +1396,7 @@ c_perm(char *perm, char ***ignored, int 
>  /*
>   * -print functions --
>   *
> - *   Always true, causes the current pathame to be written to
> + *   Always true, causes the current pathname to be written to
>   *   standard output.
>   */
>  int
> @@ -1576,7 +1576,7 @@ c_user(char *username, char ***ignored, 
>  /*
>   * -xdev functions --
>   *
> - *   Always true, causes find not to decend past directories that have a
> + *   Always true, causes find not to descend past directories that have a
>   *   different device ID (st_dev, see stat() S5.6.2 [POSIX.1])
>   */
>  PLAN *
> @@ -1679,7 +1679,7 @@ c_or(char *ignore, char ***ignored, int 
>   *
>   *   At the moment, only N_EXEC has state. Two kinds: 1)
>   *   lists of files to feed to subprocesses 2) State on exit
> - *   statusses of past subprocesses.
> + *   statuses of past subprocesses.
>   */
>  /* ARGSUSED1 */
>  int

i committed this separately as i changed "statuses" to "status".
"status" is uncountable (we don;t have a separate plural), and besides
the plural of "subprocesses" is enough.

jmc



Re: [patch(es)] fix a few typos in /src

2022-12-26 Thread Jason McIntyre
On Fri, Dec 23, 2022 at 10:33:43AM -0500, Paul Tagliamonte wrote:
> On Fri, Dec 23, 2022 at 03:03:15PM +, Stuart Henderson wrote:
> > > -struct itype *void_it;   /* no type is emited 
> > > for void */
> > > +struct itype *void_it;   /* no type is emitted 
> > > for void */
> > 
> > style(9) issue, this exceeds 80 columns
> 
> I've reflowed the line. I shudder to think that this was done
> intentionally to make it fit
> 

doh! so without spotting this note i wondered why you'd added a fix like
this, decided i didn;t want a anything to do with it, and committed only
the emited -> emitted fix. then i get to this note ;(

i've backed it out. if any other dev wants to take ctfconv/parse.c part
of this, be my guest. i'm not touching it.

jmc



Re: ksh.1: Add a missing Ns

2022-12-26 Thread Jason McIntyre
On Mon, Dec 26, 2022 at 12:11:20PM -0500, Josiah Frentsos wrote:
> Index: ksh.1
> ===

fixed, thanks.
jmc

> RCS file: /cvs/src/bin/ksh/ksh.1,v
> retrieving revision 1.217
> diff -u -p -r1.217 ksh.1
> --- ksh.1 13 Sep 2022 20:26:26 -  1.217
> +++ ksh.1 26 Dec 2022 17:10:37 -
> @@ -2713,9 +2713,7 @@ Exit status is set to zero.
>  .Cm +-x Oc
>  .Op Fl p
>  .Op Cm +
> -.Oo Ar name
> -.Op Ns = Ns Ar value
> -.Ar ... Oc
> +.Op Ar name Ns Oo = Ns Ar value Oc Ar ...
>  .Xc
>  Without arguments,
>  .Ic alias
> @@ -3454,9 +3452,7 @@ option is used, input is saved to the hi
>  .It Xo
>  .Ic readonly
>  .Op Fl p
> -.Oo Ar parameter
> -.Op Ns = Ns Ar value
> -.Ar ... Oc
> +.Op Ar parameter Ns Oo = Ns Ar value Oc Ar ...
>  .Xc
>  Sets the read-only attribute of the named parameters.
>  If values are given,
> @@ -4125,11 +4121,7 @@ Short form of
>  .Op Fl i Ns Op Ar n
>  .No \&| Fl f Op Fl tux
>  .Oc
> -.Oo
> -.Ar name
> -.Op Ns = Ns Ar value
> -.Ar ...
> -.Oc
> +.Op Ar name Ns Oo = Ns Ar value Oc Ar ...
>  .Xc
>  Display or set parameter attributes.
>  With no
> 



Re: [patch(es)] fix a few typos in /src

2022-12-25 Thread Jason McIntyre
On Thu, Dec 22, 2022 at 10:49:06PM -0500, Paul Tagliamonte wrote:
> 
> Updated patch attached with your feedback, thank you Crystal
> 

hi.

i'm rejecting these parts of this diff:

Index: lib/libcurses/term.5
Index: lib/libcurses/tinfo/comp_hash.c
Index: lib/libcurses/tty/hashmap.c
Index: lib/libedit/el.h
Index: lib/libedit/filecomplete.c
Index: lib/libedit/readline.c
Index: lib/libedit/refresh.c
Index: lib/libedit/search.c
Index: lib/libevent/buffer.c
Index: lib/libevent/event.c
Index: lib/libevent/kqueue.c
Index: lib/libexpat/Changes
Index: lib/libform/fld_info.c
Index: lib/libform/fld_user.c
Index: lib/libform/frm_post.c
Index: lib/libform/frm_user.c

for changes to curses/form i suggest you check out the latest curses
changes and mail them any relevant fixes.

for changes to libedit/libevent/libexpat i am not convinced that i
should just commit to these willy nilly. if any devs in the relevant
areas want to contact me to go ahead, fine.

jmc



Re: [patch(es)] fix a few typos in /src

2022-12-25 Thread Jason McIntyre
On Thu, Dec 22, 2022 at 10:49:06PM -0500, Paul Tagliamonte wrote:

hi. i've committed the parts of this diff relating to libssl.
jmc

> Index: lib/libssl/d1_both.c
> ===
> Index: lib/libssl/ssl.h
> ===
> Index: lib/libssl/ssl_clnt.c
> ===
> Index: lib/libssl/ssl_local.h
> ===
> Index: lib/libssl/ssl_srvr.c
> ===
> Index: lib/libssl/doc/openssl.cnf
> ===
> Index: lib/libssl/doc/standards.txt
> ===
> Index: lib/libssl/test/CAss.cnf
> ===
> Index: lib/libssl/test/CAtsa.cnf
> ===
> Index: lib/libssl/test/pkits-test.pl
> ===



Re: [patch(es)] fix a few typos in /src

2022-12-25 Thread Jason McIntyre
On Thu, Dec 22, 2022 at 10:49:06PM -0500, Paul Tagliamonte wrote:
> 
> Updated patch attached with your feedback, thank you Crystal
> 

hi.

i know by now you have the message that diffs need to be manageable ;)
i'll try and work through your changes as best i can.

so this is a heads up that i committed all parts of this diff from
lib/libcrypto. the libcrypto/libssl parts are a large subset, so i think
changes to these can be kept separate.

within the libcrypto parts, i did not take your arithmetics->arithmetic
changes. they did not seem to me to be clearly correct/preferrable.

i'll get to the rest as time permits.

jmc



Re: ksh.1: Add a missing Ns

2022-12-25 Thread Jason McIntyre
On Sat, Dec 24, 2022 at 12:25:15PM -0500, Josiah Frentsos wrote:
> Index: ksh.1
> ===
> RCS file: /cvs/src/bin/ksh/ksh.1,v
> retrieving revision 1.217
> diff -u -p -r1.217 ksh.1
> --- ksh.1 13 Sep 2022 20:26:26 -  1.217
> +++ ksh.1 24 Dec 2022 17:22:08 -
> @@ -3454,9 +3454,7 @@ option is used, input is saved to the hi
>  .It Xo
>  .Ic readonly
>  .Op Fl p
> -.Oo Ar parameter
> -.Op Ns = Ns Ar value
> -.Ar ... Oc
> +.Op Ar parameter Ns Oo = Ns Ar value Oc Ar ...
>  .Xc
>  Sets the read-only attribute of the named parameters.
>  If values are given,
> 

so i see this same notation for "alias" and "typeset". do you want to
check out whether the same changes make sense there (and whether i've
missed any) and submit an updated diff?

thanks,
jmc



Re: [patch] add show.c style flag descriptions to route(8)

2022-12-22 Thread Jason McIntyre
On Thu, Dec 22, 2022 at 07:31:26PM +, Jason McIntyre wrote:
> 
> anyway, how about this text for ipcomp/ipsec?
> jmc
> 

for completeness sake, here's the full diff.
jmc

Index: sbin/ifconfig/ifconfig.8
===
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
retrieving revision 1.387
diff -u -p -r1.387 ifconfig.8
--- sbin/ifconfig/ifconfig.826 Nov 2022 07:26:43 -  1.387
+++ sbin/ifconfig/ifconfig.822 Dec 2022 20:44:16 -
@@ -2329,11 +2329,11 @@ tried to alter an interface's configurat
 .Xr inet 4 ,
 .Xr intro 4 ,
 .Xr netintro 4 ,
-.Xr route 4 ,
 .Xr rtable 4 ,
 .Xr hostname.if 5 ,
 .Xr hosts 5 ,
 .Xr rc 8 ,
+.Xr route 8 ,
 .Xr slaacd 8 ,
 .Xr tcpdump 8
 .Sh HISTORY
Index: sbin/ping/ping.8
===
RCS file: /cvs/src/sbin/ping/ping.8,v
retrieving revision 1.65
diff -u -p -r1.65 ping.8
--- sbin/ping/ping.821 Feb 2021 17:18:01 -  1.65
+++ sbin/ping/ping.822 Dec 2022 20:44:16 -
@@ -418,8 +418,8 @@ Others may use completely wild values.
 exits 0 if at least one reply is received,
 and >0 if no reply is received or an error occurred.
 .Sh SEE ALSO
-.Xr netstat 1 ,
-.Xr ifconfig 8
+.Xr ifconfig 8 ,
+.Xr route 8
 .Sh HISTORY
 The
 .Nm
Index: share/man/man4/ipcomp.4
===
RCS file: /cvs/src/share/man/man4/ipcomp.4,v
retrieving revision 1.16
diff -u -p -r1.16 ipcomp.4
--- share/man/man4/ipcomp.4 12 Jan 2018 04:36:44 -  1.16
+++ share/man/man4/ipcomp.4 22 Dec 2022 20:44:16 -
@@ -101,14 +101,9 @@ compressed.
 .El
 .Sh DIAGNOSTICS
 .Xr netstat 1
-can be used to obtain some statistics about IPComp usage, using the
-.Fl p
-flag.
-Just like for IPsec, using the
-.Fl r
-flag,
-.Xr netstat 1
-displays information about IPComp flows.
+can be used to obtain some statistics about IPComp usage:
+.Pp
+.Dl $ netstat -s -p ipcomp
 .Sh SEE ALSO
 .Xr enc 4 ,
 .Xr inet 4 ,
Index: share/man/man4/ipsec.4
===
RCS file: /cvs/src/share/man/man4/ipsec.4,v
retrieving revision 1.88
diff -u -p -r1.88 ipsec.4
--- share/man/man4/ipsec.4  31 Mar 2022 17:27:21 -  1.88
+++ share/man/man4/ipsec.4  22 Dec 2022 20:44:16 -
@@ -356,14 +356,15 @@ was given.
 .El
 .Pp
 .Xr netstat 1
-can be used to obtain some statistics about AH and ESP usage, using the
-.Fl p
-flag.
-Using the
-.Fl r
-flag,
-.Xr netstat 1
-displays information about IPsec flows.
+can be used to obtain some statistics about AH or ESP usage:
+.Bd -literal -offset indent
+$ netstat -s -p ah
+$ netstat -s -p esp
+.Ed
+.Pp
+The
+.Xr ipsecctl 8
+command can be used to display information about IPsec flows.
 .Pp
 .Xr vmstat 8
 displays information about memory use by IPsec with the
Index: share/man/man8/afterboot.8
===
RCS file: /cvs/src/share/man/man8/afterboot.8,v
retrieving revision 1.171
diff -u -p -r1.171 afterboot.8
--- share/man/man8/afterboot.8  13 Apr 2022 18:00:34 -  1.171
+++ share/man/man8/afterboot.8  22 Dec 2022 20:44:16 -
@@ -183,9 +183,8 @@ See
 .Xr hostname.if 5
 for instructions on configuring interfaces with DHCP.
 .Pp
-Routing tables can be viewed by issuing a
-.Ic netstat -rn
-command.
+Routing tables can be viewed by issuing
+.Dq route -n show .
 The default gateway address is stored in the
 .Pa /etc/mygate
 file.
@@ -199,8 +198,10 @@ Or, you may prefer to manually configure
 .Ic route add
 and
 .Ic route delete
-commands (see
-.Xr route 8 ) .
+commands.
+See
+.Xr route 8
+for more information.
 .Pp
 If you wish to route packets between interfaces, add one or both
 of the following directives (depending on whether IPv4 or IPv6 routing
Index: usr.sbin/traceroute/traceroute.8
===
RCS file: /cvs/src/usr.sbin/traceroute/traceroute.8,v
retrieving revision 1.74
diff -u -p -r1.74 traceroute.8
--- usr.sbin/traceroute/traceroute.830 Jul 2022 07:19:31 -  1.74
+++ usr.sbin/traceroute/traceroute.822 Dec 2022 20:44:16 -
@@ -387,8 +387,8 @@ Because of the load it could impose on t
 .Nm
 during normal operations or from automated scripts.
 .Sh SEE ALSO
-.Xr netstat 1 ,
-.Xr ping 8
+.Xr ping 8 ,
+.Xr route 8
 .Sh HISTORY
 The very first
 .Nm



Re: [patch] add show.c style flag descriptions to route(8)

2022-12-22 Thread Jason McIntyre
On Thu, Dec 22, 2022 at 11:49:09AM -0800, Philip Guenther wrote:
> On Thu, Dec 22, 2022 at 11:33 AM Jason McIntyre  wrote:
> ...
> 
> > i have to say, i'm getting nowhere with this SYNOPSIS:
> >
> >  netstat -r [-AFu] [-f address_family] [-M core] [-N system]
> >  [-p protocol] [-T rtable]
> >
> > i mean the combination of -r and -p. is it wholly redundant?
> >
> 
> Yeah, looking now I think -p is ignored when -r is supplied.  I guess I
> missed that when we worked out rev 1.88 of netstat.1
> 
> Philip

so i'd rather deal with that separately. diff below to remove -p
from the -r line.

ok?

jmc

Index: main.c
===
RCS file: /cvs/src/usr.bin/netstat/main.c,v
retrieving revision 1.123
diff -u -p -r1.123 main.c
--- main.c  4 Dec 2022 23:50:48 -   1.123
+++ main.c  22 Dec 2022 20:01:56 -
@@ -485,8 +485,7 @@ usage(void)
"   netstat -s [-gru] [-f address_family] [-p protocol]\n"
"   netstat -g [-lnu] [-f address_family]\n"
"   netstat -R\n"
-   "   netstat -r [-AFu] [-f address_family] [-M core] [-N system] 
[-p protocol]\n"
-   "   [-T rtable]\n"
+   "   netstat -r [-AFu] [-f address_family] [-M core] [-N system] 
[-T rtable]\n"
"   netstat -P pcbaddr [-v] [-M core] [-N system]\n");
exit(1);
 }
Index: netstat.1
===
RCS file: /cvs/src/usr.bin/netstat/netstat.1,v
retrieving revision 1.96
diff -u -p -r1.96 netstat.1
--- netstat.1   22 Dec 2022 07:23:29 -  1.96
+++ netstat.1   22 Dec 2022 20:01:56 -
@@ -72,7 +72,6 @@
 .Op Fl f Ar address_family
 .Op Fl M Ar core
 .Op Fl N Ar system
-.Op Fl p Ar protocol
 .Op Fl T Ar rtable
 .Nm
 .Fl P Ar pcbaddr



Re: [patch] add show.c style flag descriptions to route(8)

2022-12-22 Thread Jason McIntyre
On Thu, Dec 22, 2022 at 06:35:41PM +, Stuart Henderson wrote:
> On 2022/12/22 17:58, Jason McIntyre wrote:
> > > >  flag.
> > > >  Just like for IPsec, using the
> > > > -.Fl r
> > > > -flag,
> > > > -.Xr netstat 1
> > > > +.Xr route 8
> > > > +.Cm show
> > > > +command
> > > >  displays information about IPComp flows.
> > > 
> > > That's a lie. Neither netstat nor route show IPsec flows. This was moved
> > > to ipsecctl(8). At least I was not able to display the flows with netstat
> > > or route.
> > > 
> > 
> > ah. so i tried ipcomp but thought it was maybe just not compiled in.
> > 
> > so what about the note above it:
> > 
> > DIAGNOSTICS
> >  netstat(1) can be used to obtain some statistics about
> >  IPComp usage, using the -p flag.
> > 
> > i can;t get netstat -p to do anything useful. should this whole text go,
> > or just the -r text?
> 
> netstat -s -p ipcomp (or just netstat -s and look in the ipcomp section)
> displays statistics about ipcomp usage, but doesn't list ipcomp flows.
> unless you have actually configured ipcomp (probably most easily done
> via iked) you'll just see a bunch of zeroes though.
> 
> (similarly netstat -s shows some other stats for ipsec, though not flows)
> 

i have to say, i'm getting nowhere with this SYNOPSIS:

 netstat -r [-AFu] [-f address_family] [-M core] [-N system]
 [-p protocol] [-T rtable]

i mean the combination of -r and -p. is it wholly redundant?

anyway, how about this text for ipcomp/ipsec?
jmc

Index: ipcomp.4
===
RCS file: /cvs/src/share/man/man4/ipcomp.4,v
retrieving revision 1.16
diff -u -p -r1.16 ipcomp.4
--- ipcomp.412 Jan 2018 04:36:44 -  1.16
+++ ipcomp.422 Dec 2022 19:29:18 -
@@ -101,14 +101,9 @@ compressed.
 .El
 .Sh DIAGNOSTICS
 .Xr netstat 1
-can be used to obtain some statistics about IPComp usage, using the
-.Fl p
-flag.
-Just like for IPsec, using the
-.Fl r
-flag,
-.Xr netstat 1
-displays information about IPComp flows.
+can be used to obtain some statistics about IPComp usage:
+.Pp
+.Dl $ netstat -s -p ipcomp
 .Sh SEE ALSO
 .Xr enc 4 ,
 .Xr inet 4 ,
Index: ipsec.4
===
RCS file: /cvs/src/share/man/man4/ipsec.4,v
retrieving revision 1.88
diff -u -p -r1.88 ipsec.4
--- ipsec.4 31 Mar 2022 17:27:21 -  1.88
+++ ipsec.4 22 Dec 2022 19:29:19 -
@@ -356,14 +356,15 @@ was given.
 .El
 .Pp
 .Xr netstat 1
-can be used to obtain some statistics about AH and ESP usage, using the
-.Fl p
-flag.
-Using the
-.Fl r
-flag,
-.Xr netstat 1
-displays information about IPsec flows.
+can be used to obtain some statistics about AH or ESP usage:
+.Bd -literal -offset indent
+$ netstat -s -p ah
+$ netstat -s -p esp
+.Ed
+.Pp
+The
+.Xr ipsecctl 8
+command can be used to display information about IPsec flows.
 .Pp
 .Xr vmstat 8
 displays information about memory use by IPsec with the



Re: [patch] add show.c style flag descriptions to route(8)

2022-12-22 Thread Jason McIntyre
On Thu, Dec 22, 2022 at 06:21:08PM +0100, Claudio Jeker wrote:
> On Thu, Dec 22, 2022 at 05:08:15PM +0000, Jason McIntyre wrote:
> > On Thu, Dec 22, 2022 at 07:32:18AM +0000, Jason McIntyre wrote:
> > > 
> > > next step is to examine Xr. will get round to that when i can.
> > > 
> > 
> > so i looked at where we are using netstat. a lot of the references still
> > make sense. diff below is for ones i think we can change. claudio kindly
> > help me sift through some of the less clear ones (specifically where we
> > have an Xr to netstat(1) in SEE ALSO but do not discuss it in any way
> > within the manual).
> > 
> > here's the diff.
> > 
> 
> A few comments below.
> 
> > Index: share/man/man4/ipcomp.4
> > ===
> > RCS file: /cvs/src/share/man/man4/ipcomp.4,v
> > retrieving revision 1.16
> > diff -u -p -r1.16 ipcomp.4
> > --- share/man/man4/ipcomp.4 12 Jan 2018 04:36:44 -  1.16
> > +++ share/man/man4/ipcomp.4 22 Dec 2022 17:04:39 -
> > @@ -105,9 +105,9 @@ can be used to obtain some statistics ab
> >  .Fl p
> >  flag.
> >  Just like for IPsec, using the
> > -.Fl r
> > -flag,
> > -.Xr netstat 1
> > +.Xr route 8
> > +.Cm show
> > +command
> >  displays information about IPComp flows.
> 
> That's a lie. Neither netstat nor route show IPsec flows. This was moved
> to ipsecctl(8). At least I was not able to display the flows with netstat
> or route.
> 

ah. so i tried ipcomp but thought it was maybe just not compiled in.

so what about the note above it:

DIAGNOSTICS
 netstat(1) can be used to obtain some statistics about
 IPComp usage, using the -p flag.

i can;t get netstat -p to do anything useful. should this whole text go,
or just the -r text?

> >  .Sh SEE ALSO
> >  .Xr enc 4 ,
> > Index: share/man/man4/ipsec.4
> > ===
> > RCS file: /cvs/src/share/man/man4/ipsec.4,v
> > retrieving revision 1.88
> > diff -u -p -r1.88 ipsec.4
> > --- share/man/man4/ipsec.4  31 Mar 2022 17:27:21 -  1.88
> > +++ share/man/man4/ipsec.4  22 Dec 2022 17:04:39 -
> > @@ -360,10 +360,9 @@ can be used to obtain some statistics ab
> >  .Fl p
> >  flag.
> >  Using the
> > -.Fl r
> > -flag,
> > -.Xr netstat 1
> > -displays information about IPsec flows.
> > +.Xr route 8
> > +.Cm show
> > +command displays information about IPsec flows.
> 
> See above.
> 

ditto

> >  .Pp
> >  .Xr vmstat 8
> >  displays information about memory use by IPsec with the
> > Index: share/man/man8/afterboot.8
> > ===
> > RCS file: /cvs/src/share/man/man8/afterboot.8,v
> > retrieving revision 1.171
> > diff -u -p -r1.171 afterboot.8
> > --- share/man/man8/afterboot.8  13 Apr 2022 18:00:34 -  1.171
> > +++ share/man/man8/afterboot.8  22 Dec 2022 17:04:39 -
> > @@ -184,7 +184,8 @@ See
> >  for instructions on configuring interfaces with DHCP.
> >  .Pp
> >  Routing tables can be viewed by issuing a
> > -.Ic netstat -rn
> > +.Xr route 8
> > +.Cm show
> 
> Should we add -n here as well so people don't end up waiting for DNS
> lookups? I would love if someone made -n the default and add a -N flag
> instead. Reverse DNS lookups are just not helpful in routing table output.
> 

yep, good spot. i'll adjust this.

jmc



Re: [patch] add show.c style flag descriptions to route(8)

2022-12-22 Thread Jason McIntyre
On Thu, Dec 22, 2022 at 07:32:18AM +, Jason McIntyre wrote:
> 
> next step is to examine Xr. will get round to that when i can.
> 

so i looked at where we are using netstat. a lot of the references still
make sense. diff below is for ones i think we can change. claudio kindly
help me sift through some of the less clear ones (specifically where we
have an Xr to netstat(1) in SEE ALSO but do not discuss it in any way
within the manual).

here's the diff.

jmc

Index: sbin/ifconfig/ifconfig.8
===
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
retrieving revision 1.387
diff -u -p -r1.387 ifconfig.8
--- sbin/ifconfig/ifconfig.826 Nov 2022 07:26:43 -  1.387
+++ sbin/ifconfig/ifconfig.822 Dec 2022 17:04:39 -
@@ -2329,11 +2329,11 @@ tried to alter an interface's configurat
 .Xr inet 4 ,
 .Xr intro 4 ,
 .Xr netintro 4 ,
-.Xr route 4 ,
 .Xr rtable 4 ,
 .Xr hostname.if 5 ,
 .Xr hosts 5 ,
 .Xr rc 8 ,
+.Xr route 8 ,
 .Xr slaacd 8 ,
 .Xr tcpdump 8
 .Sh HISTORY
Index: sbin/ping/ping.8
===
RCS file: /cvs/src/sbin/ping/ping.8,v
retrieving revision 1.65
diff -u -p -r1.65 ping.8
--- sbin/ping/ping.821 Feb 2021 17:18:01 -  1.65
+++ sbin/ping/ping.822 Dec 2022 17:04:39 -
@@ -418,8 +418,8 @@ Others may use completely wild values.
 exits 0 if at least one reply is received,
 and >0 if no reply is received or an error occurred.
 .Sh SEE ALSO
-.Xr netstat 1 ,
-.Xr ifconfig 8
+.Xr ifconfig 8 ,
+.Xr route 8
 .Sh HISTORY
 The
 .Nm
Index: share/man/man4/ipcomp.4
===
RCS file: /cvs/src/share/man/man4/ipcomp.4,v
retrieving revision 1.16
diff -u -p -r1.16 ipcomp.4
--- share/man/man4/ipcomp.4 12 Jan 2018 04:36:44 -  1.16
+++ share/man/man4/ipcomp.4 22 Dec 2022 17:04:39 -
@@ -105,9 +105,9 @@ can be used to obtain some statistics ab
 .Fl p
 flag.
 Just like for IPsec, using the
-.Fl r
-flag,
-.Xr netstat 1
+.Xr route 8
+.Cm show
+command
 displays information about IPComp flows.
 .Sh SEE ALSO
 .Xr enc 4 ,
Index: share/man/man4/ipsec.4
===
RCS file: /cvs/src/share/man/man4/ipsec.4,v
retrieving revision 1.88
diff -u -p -r1.88 ipsec.4
--- share/man/man4/ipsec.4  31 Mar 2022 17:27:21 -  1.88
+++ share/man/man4/ipsec.4  22 Dec 2022 17:04:39 -
@@ -360,10 +360,9 @@ can be used to obtain some statistics ab
 .Fl p
 flag.
 Using the
-.Fl r
-flag,
-.Xr netstat 1
-displays information about IPsec flows.
+.Xr route 8
+.Cm show
+command displays information about IPsec flows.
 .Pp
 .Xr vmstat 8
 displays information about memory use by IPsec with the
Index: share/man/man8/afterboot.8
===
RCS file: /cvs/src/share/man/man8/afterboot.8,v
retrieving revision 1.171
diff -u -p -r1.171 afterboot.8
--- share/man/man8/afterboot.8  13 Apr 2022 18:00:34 -  1.171
+++ share/man/man8/afterboot.8  22 Dec 2022 17:04:39 -
@@ -184,7 +184,8 @@ See
 for instructions on configuring interfaces with DHCP.
 .Pp
 Routing tables can be viewed by issuing a
-.Ic netstat -rn
+.Xr route 8
+.Cm show
 command.
 The default gateway address is stored in the
 .Pa /etc/mygate
@@ -199,8 +200,7 @@ Or, you may prefer to manually configure
 .Ic route add
 and
 .Ic route delete
-commands (see
-.Xr route 8 ) .
+commands.
 .Pp
 If you wish to route packets between interfaces, add one or both
 of the following directives (depending on whether IPv4 or IPv6 routing
Index: usr.sbin/traceroute/traceroute.8
===
RCS file: /cvs/src/usr.sbin/traceroute/traceroute.8,v
retrieving revision 1.74
diff -u -p -r1.74 traceroute.8
--- usr.sbin/traceroute/traceroute.830 Jul 2022 07:19:31 -  1.74
+++ usr.sbin/traceroute/traceroute.822 Dec 2022 17:04:39 -
@@ -387,8 +387,8 @@ Because of the load it could impose on t
 .Nm
 during normal operations or from automated scripts.
 .Sh SEE ALSO
-.Xr netstat 1 ,
-.Xr ping 8
+.Xr ping 8 ,
+.Xr route 8
 .Sh HISTORY
 The very first
 .Nm



Re: [patch] add show.c style flag descriptions to route(8)

2022-12-21 Thread Jason McIntyre
On Wed, Dec 21, 2022 at 05:15:35PM -0500, Paul Tagliamonte wrote:
> Good news, I've got my MUA sorted. Hopefully this fixes the issues with
> the CVS diffs in my reply body.
> 
> On Wed, Dec 21, 2022 at 10:09:24PM +, Jason McIntyre wrote:
> > i like the choice of "display" over "print out".
> > i don;t like the "related metadata" bit though.
> > 
> > what about just
> > 
> > Display the routing table.
> 
> done.
> 
> > you should start new sentences on new lines.
> 
> understood, done.
> 
> > i would not remove the Xr. i think if we go ahead with this, we can make
> > a separate commit where we point people to route(8) rather than
> > netstart(8), but i suspect many pages will both want references to both.
> 
> makes sense, done.
> 
> > except for that, diff seems fine.
> 
> updated patch for review attached; thank you for your (very fast!) review.
> On the off-chance I've dorked it up, i've attached it, but I think we
> should be sorted.
> 
>   paultag
> 
> -- 
> :wq
> 

hi.

so i committed your diff, with some tweaks:

- respaced the indent on the entire command list (width Fl -> Ds).
  it was too large.

- you missed an ".El" in your diff. that turned out to be quite
  fortunate, because trying to work out where it was made me find a bug
  associated with how we added the "nameserver" command. the result
  being that the text no longer squashes after "nameserver".

- i slightly reworded the text, since just plonking in "The flags column" seemed
  a bit isolated.

- i forgot it in my commit message, but i shortened the desciption for
  RTF_GATEWAY to keep all entries on a single line.

so what i actually committed to route(8) is shown below. i didn;t
include netstat(1) since i took that as-is.

next step is to examine Xr. will get round to that when i can.

thanks for the diff.
jmc

Index: sbin/route/route.8
===
RCS file: /cvs/src/sbin/route/route.8,v
retrieving revision 1.106
diff -u -p -r1.106 route.8
--- sbin/route/route.8  19 Nov 2022 19:23:37 -  1.106
+++ sbin/route/route.8  22 Dec 2022 07:17:26 -
@@ -92,7 +92,7 @@ instead of a real routing socket to test
 The
 .Nm
 utility provides the following simple commands:
-.Bl -tag -width Fl
+.Bl -tag -width Ds
 .It Xo
 .Nm route
 .Op Fl T Ar rtable
@@ -159,9 +159,6 @@ are shown.
 If a routing table is supplied with
 .Fl T ,
 only changes in that routing table will be displayed.
-.El
-.Pp
-.Bl -tag -width Fl -compact
 .It Xo
 .Ic route
 .Op Fl dtv
@@ -185,7 +182,6 @@ If no
 .Ar address
 argument is given, a request to remove the nameservers previously entered for
 the given interface is sent.
-.Pp
 .It Xo
 .Nm route
 .Op Fl nv
@@ -197,10 +193,7 @@ the given interface is sent.
 .Op Fl label Ar label
 .Op Fl priority Ar priority
 .Xc
-Print out the routing table, in a fashion similar to "netstat -r".
-The output is documented in more detail towards the end of the
-.Xr netstat 1
-manual.
+Display the routing table.
 .Pp
 If
 .Fl gateway
@@ -224,6 +217,34 @@ or
 .Cm bgp .
 If the priority is negative, then routes that do not match the numeric
 priority are shown.
+.Pp
+Within the output of
+.Cm show ,
+the "Flags" column indicates what flags are set on the route.
+The mapping between letters and flags is:
+.Bl -column "1" "RTF_BLACKHOLE" "Protocol specific routing flag #1."
+.It 1 Ta Dv RTF_PROTO1 Ta "Protocol specific routing flag #1."
+.It 2 Ta Dv RTF_PROTO2 Ta "Protocol specific routing flag #2."
+.It 3 Ta Dv RTF_PROTO3 Ta "Protocol specific routing flag #3."
+.It B Ta Dv RTF_BLACKHOLE Ta "Just discard pkts (during updates)."
+.It b Ta Dv RTF_BROADCAST Ta "Correspond to a local broadcast address."
+.It C Ta Dv RTF_CLONING Ta "Generate new routes on use."
+.It c Ta Dv RTF_CLONED Ta "Cloned routes (generated from RTF_CLONING)."
+.It D Ta Dv RTF_DYNAMIC Ta "Created dynamically (by redirect)."
+.It G Ta Dv RTF_GATEWAY Ta "Dest requires forwarding by intermediary."
+.It H Ta Dv RTF_HOST Ta "Host entry (net otherwise)."
+.It h Ta Dv RTF_CACHED Ta "Referenced by gateway route."
+.It L Ta Dv RTF_LLINFO Ta "Valid protocol to link address translation."
+.It l Ta Dv RTF_LOCAL Ta "Correspond to a local address."
+.It M Ta Dv RTF_MODIFIED Ta "Modified dynamically (by redirect)."
+.It m Ta Dv RTF_MULTICAST Ta "Correspond to a multicast address."
+.It n Ta Dv RTF_CONNECTED Ta "Interface route."
+.It P Ta Dv RTF_MPATH Ta "Multipath route."
+.It R Ta Dv RTF_REJECT Ta "Host or net unreachable."
+.It S Ta Dv RTF_STATIC Ta "Manually added."
+.It T Ta Dv RTF_MPLS Ta "MPLS route."
+.It U Ta Dv RTF_UP Ta "Route usable."
+.El
 .El
 .Pp
 .Bl -tag -width Fl -compact



Re: [patch] add show.c style flag descriptions to route(8)

2022-12-21 Thread Jason McIntyre
On Wed, Dec 21, 2022 at 12:41:42PM -0500, Paul R. Tagliamonte wrote:
> > So I think route.8 is where we should try to have complete documentation,
> > and once that is done we should change Xr's and other documentation to
> > point at route.8 instead of netstat.8
> 
> In an effort to have my interactions on this list wind up being helpful
> rather than more work for overworked maintainers, attached is a
> revised patch attempting to do so.
> 
> This removes the "Flags" description from the netstat.1 manpage
> Directly above it is an instruction to check out the route(8/4)
> pages. The Flags table was moved to route(8).
> 
> While doing this, I noticed in the exact place I was going to make a
> change to add the flags, lo and behold I found a reference to
> netlink(1). I feel quite dumb about that one; if I had read the
> manpage better, I'd have found that link and avoided all this.
> 
> That being said, I do genuinely believe moving the table to
> route is a bit more expected, so; here it is!
> 
>paultag
> --
> :wq
> 
> Index: sbin/route/route.8
> ===
> RCS file: /cvs/src/sbin/route/route.8,v
> retrieving revision 1.106
> diff -u -p -r1.106 route.8
> --- sbin/route/route.8 19 Nov 2022 19:23:37 - 1.106
> +++ sbin/route/route.8 21 Dec 2022 17:36:17 -
> @@ -197,10 +197,7 @@ the given interface is sent.
>  .Op Fl label Ar label
>  .Op Fl priority Ar priority
>  .Xc
> -Print out the routing table, in a fashion similar to "netstat -r".
> -The output is documented in more detail towards the end of the
> -.Xr netstat 1
> -manual.
> +Display all entries from the routing table, along with related metadata.

i like the choice of "display" over "print out".
i don;t like the "related metadata" bit though.

what about just

Display the routing table.

>  .Pp
>  If
>  .Fl gateway
> @@ -224,6 +221,31 @@ or
>  .Cm bgp .
>  If the priority is negative, then routes that do not match the numeric
>  priority are shown.
> +.Pp
> +The "Flags" column indicates what flags are set on the route. The mapping
> +between letters and flags is:

you should start new sentences on new lines.

> +.Bl -column "1" "RTF_BLACKHOLE" "Protocol specific routing flag #1."
> +.It 1 Ta Dv RTF_PROTO1 Ta "Protocol specific routing flag #1."
> +.It 2 Ta Dv RTF_PROTO2 Ta "Protocol specific routing flag #2."
> +.It 3 Ta Dv RTF_PROTO3 Ta "Protocol specific routing flag #3."
> +.It B Ta Dv RTF_BLACKHOLE Ta "Just discard pkts (during updates)."
> +.It b Ta Dv RTF_BROADCAST Ta "Correspond to a local broadcast address."
> +.It C Ta Dv RTF_CLONING Ta "Generate new routes on use."
> +.It c Ta Dv RTF_CLONED Ta "Cloned routes (generated from RTF_CLONING)."
> +.It D Ta Dv RTF_DYNAMIC Ta "Created dynamically (by redirect)."
> +.It G Ta Dv RTF_GATEWAY Ta "Destination requires forwarding by intermediary."
> +.It H Ta Dv RTF_HOST Ta "Host entry (net otherwise)."
> +.It h Ta Dv RTF_CACHED Ta "Referenced by gateway route."
> +.It L Ta Dv RTF_LLINFO Ta "Valid protocol to link address translation."
> +.It l Ta Dv RTF_LOCAL Ta "Correspond to a local address."
> +.It M Ta Dv RTF_MODIFIED Ta "Modified dynamically (by redirect)."
> +.It m Ta Dv RTF_MULTICAST Ta "Correspond to a multicast address."
> +.It n Ta Dv RTF_CONNECTED Ta "Interface route."
> +.It P Ta Dv RTF_MPATH Ta "Multipath route."
> +.It R Ta Dv RTF_REJECT Ta "Host or net unreachable."
> +.It S Ta Dv RTF_STATIC Ta "Manually added."
> +.It T Ta Dv RTF_MPLS Ta "MPLS route."
> +.It U Ta Dv RTF_UP Ta "Route usable."
>  .El
>  .Pp
>  .Bl -tag -width Fl -compact
> @@ -635,7 +657,6 @@ to create the new entry.
>  .El
>  .Sh SEE ALSO
>  .Xr id 1 ,
> -.Xr netstat 1 ,

i would not remove the Xr. i think if we go ahead with this, we can make
a separate commit where we point people to route(8) rather than
netstart(8), but i suspect many pages will both want references to both.

>  .Xr gethostbyname 3 ,
>  .Xr netintro 4 ,
>  .Xr route 4 ,
> Index: usr.bin/netstat/netstat.1
> ===
> RCS file: /cvs/src/usr.bin/netstat/netstat.1,v
> retrieving revision 1.95
> diff -u -p -r1.95 netstat.1
> --- usr.bin/netstat/netstat.1 8 Sep 2022 13:18:47 - 1.95
> +++ usr.bin/netstat/netstat.1 21 Dec 2022 17:36:18 -
> @@ -343,31 +343,6 @@ and
>  .Xr route 4
>  manual pages.
>  .Pp
> -The mapping between letters and flags is:
> -.Bl -column "1" "RTF_BLACKHOLE" "Protocol specific routing flag #1."
> -.It 1 Ta Dv RTF_PROTO1 Ta "Protocol specific routing flag #1."
> -.It 2 Ta Dv RTF_PROTO2 Ta "Protocol specific routing flag #2."
> -.It 3 Ta Dv RTF_PROTO3 Ta "Protocol specific routing flag #3."
> -.It B Ta Dv RTF_BLACKHOLE Ta "Just discard pkts (during updates)."
> -.It b Ta Dv RTF_BROADCAST Ta "Correspond to a local broadcast address."
> -.It C Ta Dv RTF_CLONING Ta "Generate new routes on use."
> -.It c Ta Dv RTF_CLONED Ta "Cloned routes (generated from RTF_CLONING)."
> -.It D Ta Dv RTF_DYNAMIC Ta 

Re: [patch] add show.c style flag descriptions to route(8)

2022-12-21 Thread Jason McIntyre
On Wed, Dec 21, 2022 at 10:43:18AM -0500, Paul R. Tagliamonte wrote:
> On Tue, Dec 20, 2022 at 8:27 PM Paul R. Tagliamonte  wrote:
> >
> > Heyya tech@,
> >
> > Please keep me on cc, I'm not subscribed
> 
> Please keep me on cc. The last message wasn't sent to me, so my In-Reply-To
> is going to be wrong. I'm not subscribed to tech@.

yep, sorry, i didn;t spot that note 

> From the web:
> > some of the relevant flags are already documented in route(8) ("Routes
> > have associated flags...). the entire list is documented in route(4),
> > but you have to explicitly ask for it (man 4 route)
> 
> AFAICT none of these documents which flag "h" maps to, for example.
> 

no, but netstat(8) does.

> > and again the flags with detail in netstat(8) ("The mapping between
> > letters and flags is...").
> 
> I will admit I'm not smart enough to think to check netstat(8) when
> looking at route(8) output, but that's a fair point.
> 
> I understand netstat.8 documenting flags defined in usr.bin/netstat/show.c,
> but is the review here that we should instruct users in route.8 to look up
> the flags coming from sbin/route/show.c in netstat.8 which documents
> usr.bin/netstat/show.c, not sbin/route/show.c ?
> 
> I am very sympathetic to the argument that duplicating documentation
> is bad, and can result in maintenance burden or out of date docs, but
> surely people would be more likely to update a manpage in the same
> directory as the file?
> 
> I'm OK with this going NOTABUG WONTFIX; I did find the right mappings,
> but I just had to go to the source repo to find it, so I guess
> selfishly I've got
> the knowledge I needed. I was just trying to fix a doc bug when I had state
> in memory, since I know I'd appreciate that as a fellow distro maintainer.
> 
>   paultag
> 

i don;t know why the text is where it is. maybe some of the network
people can say whether the placement makes sense or not.

jmc



Re: args vs arg ... in manuals

2022-12-20 Thread Jason McIntyre
On Wed, Dec 21, 2022 at 07:40:01AM +, Klemens Nanni wrote:
> On Tue, Dec 20, 2022 at 08:24:29PM +0000, Jason McIntyre wrote:
> > On Tue, Dec 20, 2022 at 06:24:45PM +, Klemens Nanni wrote:
> > > 
> > > Feedback? OK?
> > > 
> > 
> > ok, in general i'm fine with this. i do have some concerns though:
> 
> New diff with all points addressed, see inline for explanations.
> 

trimming this, but briefly: ok for your diff. i think this is fine. but
still one nit:

> Index: usr.bin/csplit/csplit.1
> ===
> RCS file: /cvs/src/usr.bin/csplit/csplit.1,v
> retrieving revision 1.12
> diff -u -p -r1.12 csplit.1
> --- usr.bin/csplit/csplit.1   24 Oct 2015 15:32:50 -  1.12
> +++ usr.bin/csplit/csplit.1   21 Dec 2022 06:56:23 -
> @@ -37,14 +37,15 @@
>  .Op Fl ks
>  .Op Fl f Ar prefix
>  .Op Fl n Ar number
> -.Ar file args ...
> +.Ar file
> +.Ar arg ...
>  .Sh DESCRIPTION
>  The
>  .Nm
>  utility splits
>  .Ar file
> -into pieces using the patterns
> -.Ar args .
> +into pieces using the pattern
> +.Ar arg .
>  If
>  .Ar file
>  is
> @@ -92,7 +93,7 @@ created.
>  .El
>  .Pp
>  The
> -.Ar args
> +.Ar arg
>  operands may be a combination of the following patterns:
>  .Bl -tag -width indent
>  .It Xo

so, is "arg" an operand or operands? well, it depends how you are
thinking of it. i would suggest we treat it as singular - it will read
better, and i don;t think anyone will read this text and complain that
it was misleading.

jmc



Re: [patch] add show.c style flag descriptions to route(8)

2022-12-20 Thread Jason McIntyre
On Tue, Dec 20, 2022 at 08:27:14PM -0500, Paul R. Tagliamonte wrote:
> Heyya tech@,
> 
> Please keep me on cc, I'm not subscribed
> 
> I've been working on porting some of my linux specific software to
> work on OpenBSD. While working with some routing-specific code,
> I needed to pull up show.c to map the letters in `route show` to the
> RTF_ values.
> 
> I figured while I was in there, I'd send a patch along adding that to
> the manpage in the hopes it's a bit easier for others in the future.
> Most of the descriptions were pulled from the .h
> 
> First time sending anything in to OpenBSD, please let me know if
> there's anything I can do better for next time! I'm wary of my MUA
> (GMail's web interface) destroying the patch, so I've attached it
> for redundancy.
> 
> paultag
> --
> :wq
> 

hi.

some of the relevant flags are already documented in route(8) ("Routes
have associated flags...). the entire list is documented in route(4),
but you have to explicitly ask for it (man 4 route) and again the flags
with detail in netstat(8) ("The mapping between letters and flags
is...").

jmc

> Index: route.8
> ===
> RCS file: /cvs/src/sbin/route/route.8,v
> retrieving revision 1.106
> diff -u -p -r1.106 route.8
> --- route.8 19 Nov 2022 19:23:37 - 1.106
> +++ route.8 21 Dec 2022 01:11:22 -
> @@ -571,6 +571,37 @@ and
>  .Dv RTM_CHANGE .
>  As such, only the superuser may modify
>  the routing tables.
> +.Sh FLAGS
> +When displaying routes with the
> +.Cm show
> +command, the output contains a
> +.Ar Flags
> +column indicating what flags have been set on the route. The possible
> +values and their corresponding header definition names are:
> +.Bl -column "U" "RTF_BLACKHOLE" "description"
> +.It U Ta Dv RTF_UP Ta "route is usable"
> +.It G Ta Dv RTF_GATEWAYTa "route traffic through a gateway"
> +.It H Ta Pf RTF_HOST   Ta "route target is a host entry"
> +.It R Ta Dv RTF_REJECT Ta "host or net is unreachable"
> +.It D Ta Dv RTF_DYNAMICTa "route created dynamically (by redirect)"
> +.It M Ta Pf RTF_MODIFIED   Ta "route modified dynamically (by redirect)"
> +.It C Ta Dv RTF_CLONINGTa "generate new routes on use"
> +.It m Ta Dv RTF_MULTICAST  Ta "route associated to a multicast addr"
> +.It L Ta Dv RTF_LLINFO Ta "route generated by ARP or NDP"
> +.It S Ta Dv RTF_STATIC Ta "route was manually added"
> +.It B Ta Dv RTF_BLACKHOLE  Ta "discard all traffic"
> +.It 3 Ta Dv RTF_PROTO3 Ta "protocol specific routing flag"
> +.It 2 Ta Dv RTF_PROTO2 Ta "protocol specific routing flag"
> +.It 1 Ta Dv RTF_PROTO1 Ta "protocol specific routing flag"
> +.It c Ta Dv RTF_CLONED Ta "route was cloned"
> +.It h Ta Dv RTF_CACHED Ta "referenced by gateway route"
> +.It P Ta Dv RTF_MPATH  Ta "multipath route"
> +.It T Ta Dv RTF_MPLS   Ta "MPLS route"
> +.It l Ta Dv RTF_LOCAL  Ta "route is local to the host"
> +.It F Ta Dv RTF_BFDTa "link state controlled by BFD"
> +.It b Ta Dv RTF_BROADCAST  Ta "route associated to a broadcast addr"
> +.It n Ta Dv RTF_CONNECTED  Ta "interface route"
> +.El
>  .Sh FILES
>  .Bl -tag -width "/etc/mygate" -compact
>  .It Pa /etc/hosts

> Index: route.8
> ===
> RCS file: /cvs/src/sbin/route/route.8,v
> retrieving revision 1.106
> diff -u -p -r1.106 route.8
> --- route.8   19 Nov 2022 19:23:37 -  1.106
> +++ route.8   21 Dec 2022 01:11:22 -
> @@ -571,6 +571,37 @@ and
>  .Dv RTM_CHANGE .
>  As such, only the superuser may modify
>  the routing tables.
> +.Sh FLAGS
> +When displaying routes with the
> +.Cm show
> +command, the output contains a
> +.Ar Flags
> +column indicating what flags have been set on the route. The possible
> +values and their corresponding header definition names are:
> +.Bl -column "U" "RTF_BLACKHOLE" "description"
> +.It U Ta Dv RTF_UP Ta "route is usable"
> +.It G Ta Dv RTF_GATEWAYTa "route traffic through a gateway"
> +.It H Ta Pf RTF_HOST   Ta "route target is a host entry"
> +.It R Ta Dv RTF_REJECT Ta "host or net is unreachable"
> +.It D Ta Dv RTF_DYNAMICTa "route created dynamically (by redirect)"
> +.It M Ta Pf RTF_MODIFIED   Ta "route modified dynamically (by redirect)"
> +.It C Ta Dv RTF_CLONINGTa "generate new routes on use"
> +.It m Ta Dv RTF_MULTICAST  Ta "route associated to a multicast addr"
> +.It L Ta Dv RTF_LLINFO Ta "route generated by ARP or NDP"
> +.It S Ta Dv RTF_STATIC Ta "route was manually added"
> +.It B Ta Dv RTF_BLACKHOLE  Ta "discard all traffic"
> +.It 3 Ta Dv RTF_PROTO3 Ta "protocol specific routing flag"
> +.It 2 Ta Dv RTF_PROTO2 Ta "protocol specific routing flag"
> +.It 1 Ta Dv RTF_PROTO1 Ta "protocol specific routing flag"
> +.It c Ta Dv RTF_CLONED Ta "route was cloned"
> +.It h Ta Dv RTF_CACHED Ta "referenced by gateway route"
> +.It P Ta Dv RTF_MPATH  Ta "multipath route"
> 

Re: args vs arg ... in manuals

2022-12-20 Thread Jason McIntyre
On Tue, Dec 20, 2022 at 01:53:18PM -0700, Theo de Raadt wrote:
> This went from solving one thing, which was largely agreed.
> 
> Now it is trying to introduce other changes as well.  Almost always that
> process stinks, unless it goes over the top at saying it is trying to solve
> other problems when the diff is re-introduced.  It is sneaky, and usually
> seems to be a way of trying to get people to sign off because they are tired.
> You really do know better.  The right way to handle someone doing that is for
> us to say "not ok".  BTW, this is not a new action by you.  I think it is fair
> to ask you to stop doing this.
> 
> And anyways, the way you do plural is with adding S, not adding 'S.
> 
> But what you want is more like this:
> 
>   -utility evaluates
>   +utility evaluates each
>   .Ar expression
>   and writes the result on standard output.
> 
> then you don't need to try this incorrect apostrophy.
> 
> But it does not belong in this diff, and it does not belong in the same
> commit, because that is a procedure violation.  Yes this is just manual pages,
> but processes have a way of sneaking into other more complex parts of the
> tree, so the place to stop this methodology is here.
> 

hi.

i guess these comments are directed at me (i'm sorry if i have picked
that up wrongly).

i was trying to give some feedback. i dislike the implication that i'm
somehow trying to be sneaky or trying to tire people out. that was not
my intention.

thank you for your explanation about how plurals work.

jmc



Re: args vs arg ... in manuals

2022-12-20 Thread Jason McIntyre
On Tue, Dec 20, 2022 at 06:24:45PM +, Klemens Nanni wrote:
> 
> Feedback? OK?
> 

ok, in general i'm fine with this. i do have some concerns though:

> 
> Index: share/man/man4/ddb.4
> ===
> RCS file: /cvs/src/share/man/man4/ddb.4,v
> retrieving revision 1.104
> diff -u -p -r1.104 ddb.4
> --- share/man/man4/ddb.4  11 Sep 2022 06:38:11 -  1.104
> +++ share/man/man4/ddb.4  20 Dec 2022 17:30:46 -
> @@ -1018,7 +1018,7 @@ A synonym for
>  .Tg machine
>  .It Xo
>  .Ic mac Ns Op Ic hine
> -.Ar subcommand Op Ar args ...
> +.Ar subcommand Op Ar arg ...
>  .Xc
>  Perform a platform-specific command.
>  .Pp
> Index: bin/expr/expr.1
> ===
> RCS file: /cvs/src/bin/expr/expr.1,v
> retrieving revision 1.24
> diff -u -p -r1.24 expr.1
> --- bin/expr/expr.1   16 Aug 2017 20:10:58 -  1.24
> +++ bin/expr/expr.1   20 Dec 2022 17:31:39 -
> @@ -12,12 +12,12 @@
>  .Nd evaluate expression
>  .Sh SYNOPSIS
>  .Nm expr
> -.Ar expression
> +.Ar expression ...
>  .Sh DESCRIPTION
>  The
>  .Nm
>  utility evaluates
> -.Ar expression
> +.Ar expression Ns s
>  and writes the result on standard output.
>  All operators are separate arguments to the
>  .Nm

so first off i hate "Ar blah Ns s". i do understand why we might want
it, but i;d rather avoid it. it can make the text read better, but it
can also make it read worse (so i don;t think we should just slap it
on). and the formatting is truly yucky.

expr(1) is a good example. i think it doesn;t matter that expr can take
one arg or many. when we want to descrive it at its basic level, we just
want to say that it "evalautes expression". jumping through formatting
hoops to try and indicate that more than one expression is possible is
pointless. let's try and make the text clear and simple, and let
formatting come second. here's some ideas:

-   The
.Nm
utility evaluates
.Ar expression
 and writes ...

in this case we leave the reader to understand that SYNOPSIS and the
description all clearly show that more than one arg is possible. nice
and simple. this gets my vote.

-   The
.Nm
utility evaluates one or more
.Ar expression
 and writes ...

now we are spelling it out. it is less ambiguous than the first example,
but reads badly (one or more expression)

-   The
.Nme
utility evaluates one or more expressions and writes ...

that reads better than the last example, but it misses the chance to
link "expression" as the argument name, and people will complain.

i am really ok with any of these. but i don;t like "Ar expression Ns s"
here because it both reads badly and formats ugly. i'm not saying we
can't use "Ar .* Ns s", just that we should think about not using it
willy nilly.

> Index: sbin/route/route.8
> ===
> RCS file: /cvs/src/sbin/route/route.8,v
> retrieving revision 1.106
> diff -u -p -r1.106 route.8
> --- sbin/route/route.819 Nov 2022 19:23:37 -  1.106
> +++ sbin/route/route.820 Dec 2022 17:23:09 -
> @@ -42,8 +42,8 @@
>  .Op Fl T Ar rtable
>  .Ar command
>  .Oo
> -.Op Ar modifiers
> -.Ar args
> +.Op Ar modifier ...
> +.Ar arg ...
>  .Oc
>  .Sh DESCRIPTION
>  .Nm
> @@ -110,7 +110,7 @@ option.
>  .Op Fl T Ar rtable
>  .Tg
>  .Cm flush
> -.Op Ar modifiers
> +.Op Ar modifier ...
>  .Xc
>  Delete all gateway entries from the routing table.
>  When the address family is specified by any one of the
> @@ -129,7 +129,7 @@ modifiers.
>  .Op Fl T Ar rtable
>  .Tg
>  .Cm get
> -.Op Ar modifiers
> +.Op Ar modifier ...
>  .Ar address
>  .Xc
>  Extract a routing entry from the kernel.
> @@ -143,7 +143,7 @@ same address family as the destination a
>  .Op Fl T Ar rtable
>  .Tg
>  .Cm monitor
> -.Op Ar modifiers
> +.Op Ar modifier ...
>  .Xc
>  Continuously report any changes to the routing information base,
>  routing lookup misses, or suspected network partitionings.
> @@ -278,7 +278,7 @@ have the syntax:
>  .Op Fl T Ar rtable
>  .Tg
>  .Cm add
> -.Op Ar modifiers
> +.Op Ar modifier ...
>  .Ar destination gateway
>  .Xc
>  .It Xo
> @@ -287,7 +287,7 @@ have the syntax:
>  .Op Fl T Ar rtable
>  .Tg
>  .Cm change
> -.Op Ar modifiers
> +.Op Ar modifier ...
>  .Ar destination gateway
>  .Xc
>  .It Xo
> @@ -297,7 +297,7 @@ have the syntax:
>  .Tg delete
>  .Tg
>  .Cm del Ns Op Cm ete
> -.Op Ar modifiers
> +.Op Ar modifier ...
>  .Ar destination gateway
>  .Xc
>  .El
> Index: sbin/route/route.c
> ===
> RCS file: /cvs/src/sbin/route/route.c,v
> retrieving revision 1.260
> diff -u -p -r1.260 route.c
> --- sbin/route/route.c10 Nov 2021 20:24:22 -  1.260
> +++ sbin/route/route.c20 Dec 2022 17:23:06 -
> @@ -135,9 +135,9 @@ usage(char *cp)
>   warnx("botched keyword: 

Re: args vs arg ... in manuals

2022-12-20 Thread Jason McIntyre
On Tue, Dec 20, 2022 at 09:36:39AM +, Klemens Nanni wrote:
> Both styles are used, but I argue that the former fails to distinguish
> between
>   $ program 'args in one shell word'
> and
>   $ program one arg per shell word
> 
> It's a minor thing, imho, but perhaps we can decide for one and stick to
> it throughout the tree?
> 
> Triple dots also make it immediately clear that many arguments may
> follow, no matter what the "arg"ument is named.
> 
> Here's one examplatory diff for timeout(1).
> 
> Feedback?
> 

i prefer "arg ..." too. by comparison, it would probably look weird to
write "files" instead of "file ...". indeed the Ar macro without args
outputs exactly that.

still it would be good to get an idea of how many pages would be
affected by this. if we have only a few pages using "args" it would seem
to make sense. if it's 50/50 we might want to look for more complex
examples and figure out whether all the change will be worth it.

also some things will use argument vs arg. for example ssh(1). do you
propose to change those?

jmc

> Index: timeout.1
> ===
> RCS file: /cvs/src/usr.bin/timeout/timeout.1,v
> retrieving revision 1.3
> diff -u -p -r1.3 timeout.1
> --- timeout.1 4 Sep 2021 11:58:31 -   1.3
> +++ timeout.1 29 Oct 2022 20:53:05 -
> @@ -41,14 +41,14 @@
>  .Op Fl -preserve-status
>  .Ar duration
>  .Ar command
> -.Op Ar args
> +.Op Ar arg ...
>  .Sh DESCRIPTION
>  The
>  .Nm
>  utility executes
>  .Ar command ,
>  with any
> -.Ar args ,
> +.Ar arg ... ,
>  and kills it if it is still running after the
>  specified
>  .Ar duration .
> Index: timeout.c
> ===
> RCS file: /cvs/src/usr.bin/timeout/timeout.c,v
> retrieving revision 1.21
> diff -u -p -r1.21 timeout.c
> --- timeout.c 2 Jul 2022 19:00:35 -   1.21
> +++ timeout.c 29 Oct 2022 21:08:40 -
> @@ -57,7 +57,7 @@ usage(void)
>   fprintf(stderr,
>   "usage: timeout [-k time] [-s sig] [--foreground]"
>   " [--preserve-status] duration\n"
> - "   command [args]\n");
> + "   command [arg ...]\n");
>  
>   exit(1);
>  }
> 



Re: [Patch] Probable error in sh.1

2022-12-18 Thread Jason McIntyre
On Sun, Dec 18, 2022 at 12:56:59PM +, Klemens Nanni wrote:
> 12/18/22 15:53, Stefan Hagen ??:
> > Ross L Richardson wrote (2022-12-18 10:55 CET):
> >> The word "array" occurs only once in sh.1.  Therefore, either it deserves
> >> more explanation, or removal with something like the patch below.
> > 
> > I think you're right. This looks like an oversight from the works when
> > sh(1) was rewritten / split from ksh(1) in 2015.
> > 
> > OK sdk@
> 
> Agreed, I'd say go ahead.
> 

ok jmc

> > 
> >> Ross
> >> ==
> >>
> >> --- sh.1.orig  Thu Sep  1 10:07:22 2022
> >> +++ sh.1   Sun Dec 18 20:47:53 2022
> >> @@ -1390,7 +1390,7 @@
> >>   .Pp
> >>   Where
> >>   .Ar expression
> >> -is an integer, parameter name, or array reference,
> >> +is an integer or parameter name,
> >>   optionally combined with any of the operators described below,
> >>   listed and grouped according to precedence:
> >>   .Bl -tag -width Ds
> >>
> > 
> 



Re: hostname.if(5): lladdr tweaks

2022-12-14 Thread Jason McIntyre
On Thu, Dec 15, 2022 at 05:19:14AM +, Klemens Nanni wrote:
> On Wed, Dec 14, 2022 at 04:27:37PM -0800, Andrew Hewus Fresh wrote:
> > On Mon, Dec 12, 2022 at 06:48:36AM +0000, Jason McIntyre wrote:
> > > On Fri, Dec 09, 2022 at 09:32:13PM +0000, Jason McIntyre wrote:
> > > > hi.
> > > > 
> > > > two points about the recent ability to use lladdr:
> > > > 
> > > > - the example of "bridge0" made sense when bridge was regarded as a
> > > >   separate entity and not integrated with ifconfig. plus a list of one
> > > >   example looks rubbish. now that we have a second example (lladdr) and
> > > >   bridge is not flagged as a special case, i think we can simply the
> > > >   text and reduce it to two examples
> > 
> > I thought it was an example showing that it works for "dynamic" interfaces,
> > but that's probably obvious enough without.
> > 
> > 
> > > > - i'm not sure about using "lladdr". although we use this term in
> > > >   ifconfig(8), we explain it. and people may miss it if they are 
> > > > thinking
> > > >   of mac address. i've attempted to both write the term fully as "link
> > > >   layer local address" and add a "(MAC)". i suppose you could argue that
> > > >   people who think of the term as "lladdr" might miss that (!) but i
> > > >   don;t think that is a real worry.
> > 
> > I think that since `ifconfig` prints out "lladdr" that even folks who
> > don't know what it means should be able to figure out how to use it.
> > I am a fan of defining terms though.
> > 
> > 
> > > > so here's my cut at tweaking...
> > > > jmc
> > > > 
> > > 
> > > on the back of afresh's prioroty flip diff, here's a revision of my diff
> > > after some input from deraadt. it will need adjusting again if we flip
> > > priority...
> > 
> > This looks OK to me.  I'm waiting to see if kn@ or others have feedback
> > on the swap and other installer bits before committing, but it seems the
> > idea of preferring lladdr has been given the go-ahead, so it's just a
> > matter of time.
> 
> Yes, I agree with Theo here that lladdr is more specific and should win
> present.
> 
> > 
> > I tend think of the interface name as its driver + number, so I did find
> > the distinction that the name is just the part without the number to be
> > surprising.  ifconfig(8) does say it is "name unit" with the "name" not
> > including the number, so this is correct.
> 
> jmc's might as well say "by name and unit" and "name/unit" later, no?
> Then the difference between ifconfig(8) and hostname.if(8) is smaller.
> 
> I'm not super happy with how we currently explain this
> name[unit]/group/driver dance, but another diff can deal with that.
> 
> The "Priority" sentence is subject to change, of course, but the rest is
> OK kn.
> 
> Doesn't matter much if this goes in first and the prio swap diff changes
> it or we wait for the prio diff to land first.
> 

thanks all for feedback. i comitted it, using the "unit" suggestion.
when/if priority flips, please adjust that piece of the text.

jmc



Re: sigpause.3: Make the Xr bold

2022-12-12 Thread Jason McIntyre
On Mon, Dec 12, 2022 at 06:19:17PM -0500, Josiah Frentsos wrote:
> Index: sigpause.3
> ===
> RCS file: /cvs/src/lib/libc/compat-43/sigpause.3,v
> retrieving revision 1.14
> diff -u -p -r1.14 sigpause.3
> --- sigpause.317 Jul 2013 05:42:10 -  1.14
> +++ sigpause.312 Dec 2022 23:13:44 -
> @@ -38,8 +38,10 @@
>  .Ft int
>  .Fn sigpause "int sigmask"
>  .Sh DESCRIPTION
> -.Sy This interface is made obsolete by
> +.Bf -symbolic
> +This interface is made obsolete by
>  .Xr sigsuspend 2 .
> +.Ef
>  .Pp
>  .Fn sigpause
>  assigns
> 

there were actually a few pages in compact-43 with variations on this,
so i've moved them all to this same text.

jmc



Re: hostname.if(5): lladdr tweaks

2022-12-11 Thread Jason McIntyre
On Fri, Dec 09, 2022 at 09:32:13PM +, Jason McIntyre wrote:
> hi.
> 
> two points about the recent ability to use lladdr:
> 
> - the example of "bridge0" made sense when bridge was regarded as a
>   separate entity and not integrated with ifconfig. plus a list of one
>   example looks rubbish. now that we have a second example (lladdr) and
>   bridge is not flagged as a special case, i think we can simply the
>   text and reduce it to two examples
> 
> - i'm not sure about using "lladdr". although we use this term in
>   ifconfig(8), we explain it. and people may miss it if they are thinking
>   of mac address. i've attempted to both write the term fully as "link
>   layer local address" and add a "(MAC)". i suppose you could argue that
>   people who think of the term as "lladdr" might miss that (!) but i
>   don;t think that is a real worry.
> 
> so here's my cut at tweaking...
> jmc
> 

on the back of afresh's prioroty flip diff, here's a revision of my diff
after some input from deraadt. it will need adjusting again if we flip
priority...

jmc

Index: hostname.if.5
===
RCS file: /cvs/src/share/man/man5/hostname.if.5,v
retrieving revision 1.80
diff -u -p -r1.80 hostname.if.5
--- hostname.if.5   5 Dec 2022 20:12:00 -   1.80
+++ hostname.if.5   12 Dec 2022 06:48:15 -
@@ -40,13 +40,16 @@
 The
 .Nm hostname.*\&
 files contain information regarding the configuration of each network 
interface.
-The interface can be referenced by name or lladdr, such as
-.Pa hostname.fxp0 ,
-.Pa hostname.00:00:5e:00:53:af ,
-or
-.Pa hostname.bridge0 .
-One file should exist for each interface that is to be configured,
-with priority given to configuration by interface name over lladdr.
+Interfaces are referenced by name and number,
+such as
+.Dq hostname.fxp0 .
+For some machines,
+autoconfiguration makes this system inconsistent,
+so interfaces can alternatively be referenced by
+their link layer address (lladdr),
+such as
+.Dq hostname.00:00:5e:00:53:af .
+Priority is given to configuration by interface name/number over lladdr.
 A configuration file is not needed for lo0.
 .Pp
 The configuration information is expressed in a line-by-line packed format



hostname.if(5): lladdr tweaks

2022-12-09 Thread Jason McIntyre
hi.

two points about the recent ability to use lladdr:

- the example of "bridge0" made sense when bridge was regarded as a
  separate entity and not integrated with ifconfig. plus a list of one
  example looks rubbish. now that we have a second example (lladdr) and
  bridge is not flagged as a special case, i think we can simply the
  text and reduce it to two examples

- i'm not sure about using "lladdr". although we use this term in
  ifconfig(8), we explain it. and people may miss it if they are thinking
  of mac address. i've attempted to both write the term fully as "link
  layer local address" and add a "(MAC)". i suppose you could argue that
  people who think of the term as "lladdr" might miss that (!) but i
  don;t think that is a real worry.

so here's my cut at tweaking...
jmc

Index: hostname.if.5
===
RCS file: /cvs/src/share/man/man5/hostname.if.5,v
retrieving revision 1.80
diff -u -p -r1.80 hostname.if.5
--- hostname.if.5   5 Dec 2022 20:12:00 -   1.80
+++ hostname.if.5   9 Dec 2022 21:25:06 -
@@ -40,13 +40,12 @@
 The
 .Nm hostname.*\&
 files contain information regarding the configuration of each network 
interface.
-The interface can be referenced by name or lladdr, such as
-.Pa hostname.fxp0 ,
-.Pa hostname.00:00:5e:00:53:af ,
+The interface can be referenced by name or link layer (MAC) address, such as
+.Pa hostname.fxp0
 or
-.Pa hostname.bridge0 .
+.Pa hostname.00:00:5e:00:53:af .
 One file should exist for each interface that is to be configured,
-with priority given to configuration by interface name over lladdr.
+with priority given to configuration by interface name over link layer address.
 A configuration file is not needed for lo0.
 .Pp
 The configuration information is expressed in a line-by-line packed format



Re: dlfcn(3) spacing tweak

2022-12-04 Thread Jason McIntyre
On Mon, Dec 05, 2022 at 01:47:50AM -0500, Brad Smith wrote:
> On Mon, Dec 05, 2022 at 06:42:00AM +0000, Jason McIntyre wrote:
> > On Sun, Dec 04, 2022 at 08:29:26PM -0500, Brad Smith wrote:
> > > After the RTLD_NOLOAD addition to the page the spacing looks kind of
> > > odd. Make the spacing look like RTLD_NOW / RTLD_LAZY above that.
> > > 
> > > 
> > > Index: dlfcn.3
> > > ===
> > > RCS file: /home/cvs/src/share/man/man3/dlfcn.3,v
> > > retrieving revision 1.32
> > > diff -u -p -u -p -r1.32 dlfcn.3
> > > --- dlfcn.3   20 Aug 2022 14:14:24 -  1.32
> > > +++ dlfcn.3   5 Dec 2022 01:22:53 -
> > > @@ -126,7 +126,7 @@ then it is promoted to RTLD_GLOBAL.
> > >  .Pp
> > >  Additionally, the following flag may be ORed into the mode argument:
> > >  .Pp
> > > -.Bl -tag -width "RTLD_NODELETE" -compact -offset indent
> > > +.Bl -tag -width "RTLD_NODELETE" -offset indent
> > >  .It Sy RTLD_NODELETE
> > >  Prevents unload of the loaded object on
> > >  .Fn dlclose .
> > > 
> > 
> > hi.
> > 
> > i've no issue with or without -compact, but you should adjust the
> > RTLD_GLOBAL/RTLD_LOCAL list to the same format.
> > 
> > jmc
> 
> Here goes.
> 

yep, ok.
jmc

> 
> Index: dlfcn.3
> ===
> RCS file: /home/cvs/src/share/man/man3/dlfcn.3,v
> retrieving revision 1.32
> diff -u -p -u -p -r1.32 dlfcn.3
> --- dlfcn.3   20 Aug 2022 14:14:24 -  1.32
> +++ dlfcn.3   5 Dec 2022 06:45:33 -
> @@ -109,7 +109,7 @@ This is the default value if resolution 
>  .Pp
>  One of the following values may be used to specify symbol visibility:
>  .Pp
> -.Bl -tag -width "RTLD_GLOBAL" -compact -offset indent
> +.Bl -tag -width "RTLD_GLOBAL" -offset indent
>  .It Sy RTLD_GLOBAL
>  The object's symbols and the symbols of its dependencies will be visible to
>  other objects.
> @@ -126,7 +126,7 @@ then it is promoted to RTLD_GLOBAL.
>  .Pp
>  Additionally, the following flag may be ORed into the mode argument:
>  .Pp
> -.Bl -tag -width "RTLD_NODELETE" -compact -offset indent
> +.Bl -tag -width "RTLD_NODELETE" -offset indent
>  .It Sy RTLD_NODELETE
>  Prevents unload of the loaded object on
>  .Fn dlclose .



Re: dlfcn(3) spacing tweak

2022-12-04 Thread Jason McIntyre
On Sun, Dec 04, 2022 at 08:29:26PM -0500, Brad Smith wrote:
> After the RTLD_NOLOAD addition to the page the spacing looks kind of
> odd. Make the spacing look like RTLD_NOW / RTLD_LAZY above that.
> 
> 
> Index: dlfcn.3
> ===
> RCS file: /home/cvs/src/share/man/man3/dlfcn.3,v
> retrieving revision 1.32
> diff -u -p -u -p -r1.32 dlfcn.3
> --- dlfcn.3   20 Aug 2022 14:14:24 -  1.32
> +++ dlfcn.3   5 Dec 2022 01:22:53 -
> @@ -126,7 +126,7 @@ then it is promoted to RTLD_GLOBAL.
>  .Pp
>  Additionally, the following flag may be ORed into the mode argument:
>  .Pp
> -.Bl -tag -width "RTLD_NODELETE" -compact -offset indent
> +.Bl -tag -width "RTLD_NODELETE" -offset indent
>  .It Sy RTLD_NODELETE
>  Prevents unload of the loaded object on
>  .Fn dlclose .
> 

hi.

i've no issue with or without -compact, but you should adjust the
RTLD_GLOBAL/RTLD_LOCAL list to the same format.

jmc



Re: tmux.1: Sort options

2022-11-10 Thread Jason McIntyre
On Thu, Nov 10, 2022 at 03:10:32PM -0500, Josiah Frentsos wrote:
> Index: tmux.1
> ===
> RCS file: /cvs/src/usr.bin/tmux/tmux.1,v
> retrieving revision 1.905
> diff -u -p -r1.905 tmux.1
> --- tmux.13 Nov 2022 08:33:57 -   1.905
> +++ tmux.110 Nov 2022 20:07:56 -
> @@ -23,7 +23,7 @@
>  .Sh SYNOPSIS
>  .Nm tmux
>  .Bk -words
> -.Op Fl 2CDluvV
> +.Op Fl 2CDluVv
>  .Op Fl c Ar shell-command
>  .Op Fl f Ar file
>  .Op Fl L Ar socket-name
> @@ -100,7 +100,7 @@ Force
>  .Nm
>  to assume the terminal supports 256 colours.
>  This is equivalent to
> -.Fl T Ar 256 .
> +.Fl T Cm 256 .

hi. i committed your diff - thanks for sending it. but i left out the
change above (Ar -> Cm). the reason being that i think it unrelated to a
diff to sort options, and on top of that there's a whole section on the
features, and none of them are marked up at all.

if you want to submit a separate diff to make the features all use Cm
that's fine. but it;s a big page, so try to make sure it is consistent
(no easy task ;)

cheers,
jmc

>  .It Fl C
>  Start in control mode (see the
>  .Sx CONTROL MODE
> @@ -203,6 +203,12 @@ If
>  is specified, the default socket directory is not used and any
>  .Fl L
>  flag is ignored.
> +.It Fl T Ar features
> +Set terminal features for the client.
> +This is a comma-separated list of features.
> +See the
> +.Ic terminal-features
> +option.
>  .It Fl u
>  Write UTF-8 output to the terminal even if the first environment
>  variable of
> @@ -214,12 +220,10 @@ that is set does not contain
>  .Qq UTF-8
>  or
>  .Qq UTF8 .
> -.It Fl T Ar features
> -Set terminal features for the client.
> -This is a comma-separated list of features.
> -See the
> -.Ic terminal-features
> -option.
> +.It Fl V
> +Report the
> +.Nm
> +version.
>  .It Fl v
>  Request verbose logging.
>  Log messages will be saved into
> @@ -244,10 +248,6 @@ signal may be sent to the
>  server process to toggle logging between on (as if
>  .Fl v
>  was given) and off.
> -.It Fl V
> -Report the
> -.Nm
> -version.
>  .It Ar command Op Ar flags
>  This specifies one of a set of commands used to control
>  .Nm ,
> 



Re: qcpmic.4, qcpmicgpio.4, etc.: Sort SEE ALSO

2022-11-10 Thread Jason McIntyre
On Thu, Nov 10, 2022 at 05:13:40PM +, Patrick Wildt wrote:
> There are other drivers with intro after others. Are we sorting those 
> alphabetically or by relevancy?
> 

alphabetically, and in section order. i am kinda busy at the mo, if
anyone wants to fix these...

jmc

> Von meinem iPhone gesendet
> 
> > Am 10.11.2022 um 16:46 schrieb Josiah Frentsos :
> > 
> > ???Index: qcpmic.4
> > ===
> > RCS file: /cvs/src/share/man/man4/qcpmic.4,v
> > retrieving revision 1.2
> > diff -u -p -r1.2 qcpmic.4
> > --- qcpmic.410 Nov 2022 13:08:57 -1.2
> > +++ qcpmic.410 Nov 2022 16:43:07 -
> > @@ -34,12 +34,12 @@ Snapdragon SoCs.
> > The functionality for the hardware blocks found in each PMIC is
> > implemented in the children attaching to this driver.
> > .Sh SEE ALSO
> > -.Xr qcspmi 4 ,
> > +.Xr intro 4 ,
> > .Xr qcpmicgpio 4 ,
> > .Xr qcpon 4 ,
> > .Xr qcpwm 4 ,
> > .Xr qcrtc 4 ,
> > -.Xr intro 4
> > +.Xr qcspmi 4
> > .Sh HISTORY
> > The
> > .Nm
> > Index: qcpmicgpio.4
> > ===
> > RCS file: /cvs/src/share/man/man4/qcpmicgpio.4,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 qcpmicgpio.4
> > --- qcpmicgpio.410 Nov 2022 12:57:08 -1.1
> > +++ qcpmicgpio.410 Nov 2022 16:43:07 -
> > @@ -30,8 +30,8 @@ SoCs.
> > It does not provide direct device driver entry points but makes its
> > functions available to other drivers.
> > .Sh SEE ALSO
> > -.Xr qcpmic 4 ,
> > -.Xr intro 4
> > +.Xr intro 4 ,
> > +.Xr qcpmic 4
> > .Sh HISTORY
> > The
> > .Nm
> > Index: qcpon.4
> > ===
> > RCS file: /cvs/src/share/man/man4/qcpon.4,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 qcpon.4
> > --- qcpon.410 Nov 2022 13:08:57 -1.1
> > +++ qcpon.410 Nov 2022 16:43:07 -
> > @@ -26,10 +26,11 @@
> > The
> > .Nm
> > driver provides support for the PON controllers integrated on various
> > -Qualcomm Snapdragon SoCs.  This controller contains the power button.
> > +Qualcomm Snapdragon SoCs.
> > +This controller contains the power button.
> > .Sh SEE ALSO
> > -.Xr qcpmic 4 ,
> > -.Xr intro 4
> > +.Xr intro 4 ,
> > +.Xr qcpmic 4
> > .Sh HISTORY
> > The
> > .Nm
> > Index: qcpwm.4
> > ===
> > RCS file: /cvs/src/share/man/man4/qcpwm.4,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 qcpwm.4
> > --- qcpwm.410 Nov 2022 13:08:57 -1.1
> > +++ qcpwm.410 Nov 2022 16:43:07 -
> > @@ -28,8 +28,8 @@ The
> > driver provides support for the PWM controllers integrated on various
> > Qualcomm Snapdragon SoCs.
> > .Sh SEE ALSO
> > -.Xr qcpmic 4 ,
> > -.Xr intro 4
> > +.Xr intro 4 ,
> > +.Xr qcpmic 4
> > .Sh HISTORY
> > The
> > .Nm
> > Index: qcrtc.4
> > ===
> > RCS file: /cvs/src/share/man/man4/qcrtc.4,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 qcrtc.4
> > --- qcrtc.410 Nov 2022 13:08:57 -1.1
> > +++ qcrtc.410 Nov 2022 16:43:07 -
> > @@ -28,8 +28,8 @@ The
> > driver provides support for the RTC integrated on various Qualcomm
> > Snapdragon SoCs.
> > .Sh SEE ALSO
> > -.Xr qcpmic 4 ,
> > -.Xr intro 4
> > +.Xr intro 4 ,
> > +.Xr qcpmic 4
> > .Sh HISTORY
> > The
> > .Nm
> > Index: qcspmi.4
> > ===
> > RCS file: /cvs/src/share/man/man4/qcspmi.4,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 qcspmi.4
> > --- qcspmi.410 Nov 2022 12:57:08 -1.1
> > +++ qcspmi.410 Nov 2022 16:43:07 -
> > @@ -29,8 +29,8 @@ The
> > driver provides support for the SPMI controller found on various
> > Qualcomm Snapdragon SoCs.
> > .Sh SEE ALSO
> > -.Xr qcpmic 4 ,
> > -.Xr intro 4
> > +.Xr intro 4 ,
> > +.Xr qcpmic 4
> > .Sh HISTORY
> > The
> > .Nm
> > 
> 



Re: pause.3: Use Fn

2022-11-09 Thread Jason McIntyre
On Tue, Nov 08, 2022 at 04:35:33PM -0500, Josiah Frentsos wrote:
> Index: pause.3
> ===
> RCS file: /cvs/src/lib/libc/gen/pause.3,v
> retrieving revision 1.15
> diff -u -p -r1.15 pause.3
> --- pause.3   2 Aug 2022 01:23:23 -   1.15
> +++ pause.3   8 Nov 2022 21:22:46 -
> @@ -39,7 +39,8 @@
>  .Fn pause void
>  .Sh DESCRIPTION
>  .Bf -symbolic
> -Pause is made obsolete by
> +.Fn pause
> +is made obsolete by
>  .Xr sigsuspend 2 .
>  .Ef
>  .Pp
> 

committed, thanks.
jmc



Re: netstart: trim DESCRIPTION

2022-10-25 Thread Jason McIntyre
i'm ok with this. however it is really *a* command script, rather than *the* 
command script.

jmc

On 25 October 2022 10:47:21 BST, Klemens Nanni  wrote:
>- just call it (a sh(1)) script, in line with MAKEDEV(8) and rc.d(8)
>- use only .Nm thereafter instead of .Nm/the .Nm script/...
>- zap the additional rc.conf(8) bits for they can be found in there
>- zap unhelpful "(or can be)"
>
>Feedback? Objection? OK?
>
>
>Index: netstart.8
>===
>RCS file: /cvs/src/share/man/man8/netstart.8,v
>retrieving revision 1.30
>diff -u -p -r1.30 netstart.8
>--- netstart.8 25 Oct 2022 08:40:25 -  1.30
>+++ netstart.8 25 Oct 2022 09:46:32 -
>@@ -30,25 +30,24 @@
> .Os
> .Sh NAME
> .Nm netstart
>-.Nd command script for network startup
>+.Nd network startup script
> .Sh SYNOPSIS
> .Cm sh Pa /etc/netstart
> .Op Fl n
> .Op Ar interface ...
> .Sh DESCRIPTION
> .Nm
>-is the command script that is invoked by
>+is the
>+.Xr sh 1
>+script invoked by
> .Xr rc 8
> during an automatic reboot and after single-user mode is exited;
> it performs network initialization.
> .Pp
>-The
> .Nm
>-script can also be used to start newly created interfaces.
>-The behaviour of this script is (or can be) controlled to some
>-extent by variables defined in
>-.Xr rc.conf 8 ,
>-which specifies which daemons and services are to be run.
>+can also be used to start newly created interfaces.
>+Its behaviour is controlled to some extent by variables defined in
>+.Xr rc.conf 8 .
> .Pp
> During the system boot,
> .Nm
>



Re: netstart: improve DESCRIPTION

2022-10-24 Thread Jason McIntyre
On Mon, Oct 24, 2022 at 06:35:17PM +, Klemens Nanni wrote:
> On Fri, Oct 21, 2022 at 06:58:52PM +, Klemens Nanni wrote:
> > On Fri, Oct 21, 2022 at 06:39:59PM +0100, Jason McIntyre wrote:
> > > i was going to incliude this in my answer, but eventually thought it
> > > looks like a seperate diff:
> > > 
> > > the text currently reads as though only a singular interface is
> > > specified, and -n is kind of hidden. so i reworked the text. i went with
> > > an example which basically mirrors synopsis, because it works with the
> > > -n text, and i wanted to avoid marking up interface, but not doing so
> > > added other ambiguities.
> > > 
> > > so is this better? it's as unobtrusive as i could make it.
> > 
> > I agree with the singular -> plural change to make clear that multiple
> > interfaces work.
> > 
> > However, I don't see much value in an example invocation at the first
> > place:  the synopsis is trivial, echo(1) doesn't have examples, either.
> 
> How about this?
> 
> - use plural to clarify how more than interface may be passed
> - drop the distinction between interface and bridge
> - drop uesless example:  netstart is as trivial as echo(1)
> - mention options the usual way, this also adds tags which makes ":tn"
>   work as expected
> 
> Feedback? Objection? OK?
> 
> 
> Index: netstart.8
> ===
> RCS file: /cvs/src/share/man/man8/netstart.8,v
> retrieving revision 1.29
> diff -u -p -r1.29 netstart.8
> --- netstart.824 Oct 2022 17:58:43 -  1.29
> +++ netstart.824 Oct 2022 18:35:07 -
> @@ -44,7 +44,7 @@ it performs network initialization.
>  .Pp
>  The
>  .Nm
> -script can also be used to start newly created interfaces or bridges.
> +script can also be used to start newly created interfaces.
>  The behaviour of this script is (or can be) controlled to some
>  extent by variables defined in
>  .Xr rc.conf 8 ,
> @@ -88,19 +88,17 @@ and
>  .Xr wg 4 .
>  .El
>  .Pp
> -After the system is completely initialized, it is possible to start a
> -newly created interface or bridges or apply the configuration from a
> +After the system is completely initialized, it is possible to start
> +newly created interfaces or apply configuration from
>  .Xr hostname.if 5
> -file to an existing interface, by invoking the following, where
> -.Ar foo0
> -is the interface or bridge name:
> +files to an existing interfaces.
>  .Pp
> -.D1 # sh /etc/netstart foo0
> -.Pp
> -Using the
> -.Fl n
> -option reports the steps that would be taken,
> -without actually configuring the interface.
> +The options are as follows:
> +.Bl -tag -width Ds
> +.It Fl n
> +Reports the steps that would be taken,
> +without actually configuring anything.
> +.El
>  .Sh SEE ALSO
>  .Xr multicast 4 ,
>  .Xr defaultdomain 5 ,
> 

i think that's fine. ok.
jmc



Re: kqueue.2: Add a comma

2022-10-22 Thread Jason McIntyre
On Fri, Oct 21, 2022 at 07:05:03PM -0400, Josiah Frentsos wrote:
> Index: kqueue.2
> ===
> RCS file: /cvs/src/lib/libc/sys/kqueue.2,v
> retrieving revision 1.46
> diff -u -p -r1.46 kqueue.2
> --- kqueue.2  31 Mar 2022 17:27:16 -  1.46
> +++ kqueue.2  21 Oct 2022 23:02:57 -
> @@ -105,7 +105,7 @@ is zero,
>  .Fn kevent
>  will return immediately even if there is a
>  .Fa timeout
> -specified unlike
> +specified, unlike
>  .Xr select 2 .
>  If
>  .Fa timeout

i took this...

> @@ -494,7 +494,7 @@ creates a new kernel event queue and ret
>  If there was an error creating the kernel event queue, a value of -1 is
>  returned and
>  .Va errno
> -set.
> +is set.
>  .Pp
>  .Fn kevent
>  returns the number of events placed in the
> 

...but not this. there's no need to repeat the verb here.

jmc



Re: netstart: fix synopsis

2022-10-22 Thread Jason McIntyre
On Fri, Oct 21, 2022 at 06:58:52PM +, Klemens Nanni wrote:
> On Fri, Oct 21, 2022 at 06:39:59PM +0100, Jason McIntyre wrote:
> > i was going to incliude this in my answer, but eventually thought it
> > looks like a seperate diff:
> > 
> > the text currently reads as though only a singular interface is
> > specified, and -n is kind of hidden. so i reworked the text. i went with
> > an example which basically mirrors synopsis, because it works with the
> > -n text, and i wanted to avoid marking up interface, but not doing so
> > added other ambiguities.
> > 
> > so is this better? it's as unobtrusive as i could make it.
> 
> I agree with the singular -> plural change to make clear that multiple
> interfaces work.
> 
> However, I don't see much value in an example invocation at the first
> place:  the synopsis is trivial, echo(1) doesn't have examples, either.
> 
> But now that I see your diff, I think we should actually include `sh'
> in the synopsis since /etc/netstart is not executable, so the documented
> form does not actually work (I just never noticed this missing bit):
> 
>   $ man -h netstart
>   /etc/netstart [-n] [interface ...]
>   $ /etc/netstart
>   ksh: /etc/netstart: cannot execute - Permission denied
> 
> Feedback? Objection? OK?
> 

i don;t mind doing it that way either. i couldn;t find any similar pages
to compare, so feel free.

jmc

> 
> Index: share/man/man8/netstart.8
> ===
> RCS file: /cvs/src/share/man/man8/netstart.8,v
> retrieving revision 1.28
> diff -u -p -r1.28 netstart.8
> --- share/man/man8/netstart.8 21 Oct 2022 12:04:51 -  1.28
> +++ share/man/man8/netstart.8 21 Oct 2022 18:57:40 -
> @@ -32,7 +32,7 @@
>  .Nm netstart
>  .Nd command script for network startup
>  .Sh SYNOPSIS
> -.Nm /etc/netstart
> +.Cm sh Pa /etc/netstart
>  .Op Fl n
>  .Op Ar interface ...
>  .Sh DESCRIPTION
> Index: etc/netstart
> ===
> RCS file: /cvs/src/etc/netstart,v
> retrieving revision 1.220
> diff -u -p -r1.220 netstart
> --- etc/netstart  21 Oct 2022 12:04:51 -  1.220
> +++ etc/netstart  21 Oct 2022 18:56:45 -
> @@ -7,7 +7,7 @@ set +o sh
>  
>  # Show usage of the netstart script and exit.
>  usage() {
> - print -u2 "usage: ${0##*/} [-n] [interface ...]"
> + print -u2 "usage: sh ${0##*/} [-n] [interface ...]"
>   exit 1
>  }
>  
> 



Re: ZZZ and extra mountpoints

2022-10-21 Thread Jason McIntyre
On Fri, Oct 21, 2022 at 10:34:23AM -0600, Theo de Raadt wrote:
> Sol??ne Rapenne  wrote:
> 
> > I agree my sentence isn't good enough or is too much, but I think ZZZ
> > explanations isn't enough in its current form
> 
> Maybe it is lacking.  But your previous diff didn't help anyone.
> 
> > from your reply I got
> > information such as external devices that wasn't described in the man
> > page.
> 
> External devices have to get detached.  They lose their configuration
> because they lose their power.
> 
> The problem is that it is very difficult to explain to users, in a
> precise way, what an 'external device' is versus an 'internal device'.
> 
> It is extremely complicated, there is no way to accurately explain
> in user-speak what devices detach and what devices don't detach.
> 

pluggable?

> And if we can't write a correct sentence for that, maybe we should realize
> we don't need to?
> 
> Make a proposal.
> 

i agree that the original proposal was wrong. if anything, you'd maybe
want to know, for example, how to make it that you *were* asked for your
password when resuming an encrypted mount. that seems more pertinent to
softraid(4) than apm(8).

jmc



Re: netstart: fix synopsis

2022-10-21 Thread Jason McIntyre
On Fri, Oct 21, 2022 at 12:55:49PM +0100, Jason McIntyre wrote:
> On Fri, Oct 21, 2022 at 09:30:08AM +, Klemens Nanni wrote:
> > Using -n does not require an interface:
> > 
> > # sh /etc/netstart -n ; echo $?
> > ifconfig lo0 inet 127.0.0.1/8
> > route -qn add -inet6 fe80:: -prefixlen 10 ::1 -reject
> > ...
> > 0
> > 
> > OK?
> > 
> 
> ok.
> jmc
> 

i was going to incliude this in my answer, but eventually thought it
looks like a seperate diff:

the text currently reads as though only a singular interface is
specified, and -n is kind of hidden. so i reworked the text. i went with
an example which basically mirrors synopsis, because it works with the
-n text, and i wanted to avoid marking up interface, but not doing so
added other ambiguities.

so is this better? it's as unobtrusive as i could make it.
jmc

Index: netstart.8
===
RCS file: /cvs/src/share/man/man8/netstart.8,v
retrieving revision 1.28
diff -u -p -r1.28 netstart.8
--- netstart.8  21 Oct 2022 12:04:51 -  1.28
+++ netstart.8  21 Oct 2022 17:36:32 -
@@ -88,19 +88,21 @@ and
 .Xr wg 4 .
 .El
 .Pp
-After the system is completely initialized, it is possible to start a
-newly created interface or bridges or apply the configuration from a
+After the system is completely initialized
+it is possible to start newly created interfaces or bridges,
+or apply the configuration from
 .Xr hostname.if 5
-file to an existing interface, by invoking the following, where
-.Ar foo0
-is the interface or bridge name:
+files to existing interfaces,
+by invoking
+.Nm
+in this fashion:
 .Pp
-.D1 # sh /etc/netstart foo0
+.D1 # sh /etc/netstart [-n] [interface]
 .Pp
 Using the
 .Fl n
 option reports the steps that would be taken,
-without actually configuring the interface.
+without actually configuring anything.
 .Sh SEE ALSO
 .Xr multicast 4 ,
 .Xr defaultdomain 5 ,



Re: netstart: fix synopsis

2022-10-21 Thread Jason McIntyre
On Fri, Oct 21, 2022 at 09:30:08AM +, Klemens Nanni wrote:
> Using -n does not require an interface:
> 
>   # sh /etc/netstart -n ; echo $?
>   ifconfig lo0 inet 127.0.0.1/8
>   route -qn add -inet6 fe80:: -prefixlen 10 ::1 -reject
>   ...
>   0
> 
> OK?
> 

ok.
jmc

> Index: etc/netstart
> ===
> RCS file: /cvs/src/etc/netstart,v
> retrieving revision 1.219
> diff -u -p -r1.219 netstart
> --- etc/netstart  3 Jul 2022 12:14:36 -   1.219
> +++ etc/netstart  21 Oct 2022 09:27:23 -
> @@ -7,7 +7,7 @@ set +o sh
>  
>  # Show usage of the netstart script and exit.
>  usage() {
> - print -u2 "usage: ${0##*/} [[-n] interface ...]"
> + print -u2 "usage: ${0##*/} [-n] [interface ...]"
>   exit 1
>  }
>  
> Index: share/man/man8/netstart.8
> ===
> RCS file: /cvs/src/share/man/man8/netstart.8,v
> retrieving revision 1.27
> diff -u -p -r1.27 netstart.8
> --- share/man/man8/netstart.8 5 Jul 2022 08:14:12 -   1.27
> +++ share/man/man8/netstart.8 21 Oct 2022 09:28:36 -
> @@ -33,7 +33,8 @@
>  .Nd command script for network startup
>  .Sh SYNOPSIS
>  .Nm /etc/netstart
> -.Op Oo Fl n Oc Ar interface ...
> +.Op Fl n
> +.Op Ar interface ...
>  .Sh DESCRIPTION
>  .Nm
>  is the command script that is invoked by
> 



Re: aucat.1: Improve description

2022-10-14 Thread Jason McIntyre
On Thu, Oct 13, 2022 at 02:22:56PM +0100, Jason McIntyre wrote:
> On Wed, Oct 12, 2022 at 08:51:10PM -0400, Josiah Frentsos wrote:
> > Index: aucat.1
> > ===
> > RCS file: /cvs/src/usr.bin/aucat/aucat.1,v
> > retrieving revision 1.117
> > diff -u -p -r1.117 aucat.1
> > --- aucat.1 7 Mar 2022 09:04:45 -   1.117
> > +++ aucat.1 13 Oct 2022 00:49:47 -
> > @@ -19,7 +19,7 @@
> >  .Os
> >  .Sh NAME
> >  .Nm aucat
> > -.Nd audio files manipulation tool
> > +.Nd manipulate audio files
> >  .Sh SYNOPSIS
> >  .Nm aucat
> >  .Op Fl dn
> > 
> 
> i think i prefer it as-is. it says what it is, not what it does. i might
> be inclined to shave the "s" off "files" though...
> 
> jmc

no one shouted, so i went ahead and made the files->file change.
jmc



Re: vm.conf.5: Use the proper macros

2022-10-14 Thread Jason McIntyre
On Sat, Sep 24, 2022 at 10:09:43AM -0400, Josiah Frentsos wrote:
> --- vm.conf.5
> +++ vm.conf.5

hi. i reread this and agree it's better. now committed. thanks for the
diff, and sorry for the wait.

jmc
 
> @@ -117,8 +117,11 @@ a random prefix from the
>  .Dq unique local
>  network range fd00::/8 will be generated on startup.
>  The specified prefix length must be /64 or smaller.
> -.It Cm socket owner Ar user : Ns Ar group
> -Set the control socket owner to the specified user and group.
> +.It Ic socket owner Ar user : Ns Ar group
> +Set the control socket owner to the specified
> +.Ar user
> +and
> +.Ar group .
>  Users with access to the control socket will be allowed to use
>  .Xr vmctl 8
>  for restricted access to
> @@ -160,28 +163,28 @@ Typically this is a hostname.
>  .Pp
>  Followed by a block of parameters that is enclosed in curly brackets:
>  .Bl -tag -width Ds
> -.It Cm allow instance Brq ...
> +.It Ic allow instance Brq ...
>  Set the permissions to create VM instances.
>  See
>  .Sx VM INSTANCES .
> -.It Cm boot Ar path
> +.It Ic boot Ar path
>  Kernel or BIOS image to load when booting the VM.
>  If not specified, the default is to boot using the BIOS image in
>  .Pa /etc/firmware/vmm-bios .
> -.It Cm boot device Ar device
> +.It Ic boot device Ar device
>  Force VM to boot from
>  .Ar device .
>  Valid values are:
>  .Bl -tag -width "cdrom"
> -.It Ar cdrom
> +.It Cm cdrom
>  Boot the ISO image file specified using the
>  .Ic cdrom
>  parameter.
> -.It Ar disk
> +.It Cm disk
>  Boot from the disk image file specified using the
>  .Ic disk
>  parameter.
> -.It Ar net
> +.It Cm net
>  Boot the kernel specified using the
>  .Ic boot
>  parameter as if the VM was network booted.
> @@ -195,45 +198,45 @@ but rather a simulated network boot.
>  .El
>  .Pp
>  Currently
> -.Ar disk
> +.Cm disk
>  and
> -.Ar cdrom
> +.Cm cdrom
>  only work with VMs booted using BIOS.
> -.It Cm cdrom Ar path
> +.It Ic cdrom Ar path
>  ISO image file.
> -.It Cm enable
> +.It Ic enable
>  Automatically start the VM.
>  This is the default if neither
> -.Cm enable
> +.Ic enable
>  nor
> -.Cm disable
> +.Ic disable
>  is specified.
> -.It Cm disable
> +.It Ic disable
>  Do not start this VM.
> -.It Cm disk Ar path Op Cm format Ar fmt
> +.It Ic disk Ar path Op Ic format Ar fmt
>  Disk image file (may be specified multiple times to add multiple disk 
> images).
>  The format may be specified as either
> -.Ar qcow2
> +.Cm qcow2
>  or
> -.Ar raw .
> +.Cm raw .
>  If left unspecified, the format defaults to
> -.Pa raw
> +.Cm raw
>  if it cannot be derived automatically.
> -.It Oo Cm local Oc Cm interface Oo name Oc Op Brq ...
> +.It Oo Ic local Oc Ic interface Oo Ar name Oc Op Brq ...
>  Network interface to add to the VM.
>  The optional
>  .Ar name
>  can be either
> -.Sq tap
> +.Cm tap
>  to select the next available
>  .Xr tap 4
>  interface on the VM host side (the default) or
> -.Ar tapN
> +.Cm tap Ns Ar N
>  to select a specific one.
>  .Pp
>  Valid options are:
>  .Bl -tag -width Ds
> -.It Cm group Ar group-name
> +.It Ic group Ar group-name
>  Assign the interface to a specific interface
>  .Dq group .
>  For example, this can be used to write
> @@ -244,13 +247,13 @@ The
>  must not be longer than 15 characters or end with a digit,
>  as described in
>  .Xr ifconfig 8 .
> -.It Oo Cm locked Oc Cm lladdr Op Ar etheraddr
> +.It Oo Ic locked Oc Ic lladdr Op Ar etheraddr
>  Change the link layer address (MAC address) of the interface on the
>  VM guest side.
>  If not specified, a randomized address will be assigned by
>  .Xr vmd 8 .
>  If the
> -.Cm locked
> +.Ic locked
>  keyword is specified,
>  .Xr vmd 8
>  will drop packets from the VM with altered source addresses.
> @@ -262,30 +265,29 @@ If attaching to a switch that also has an
>  set, the
>  .Ar rdomainid
>  configured for the interface takes precedence.
> -.It Cm switch Ar name
> -Set the virtual switch
> -by
> +.It Ic switch Ar name
> +Set the virtual switch by
>  .Ar name .
>  See the
>  .Sx SWITCH CONFIGURATION
>  section about virtual switches.
>  This option is ignored if a switch with a matching name cannot be found.
> -.It Cm up
> +.It Ic up
>  Start the interface forwarding packets.
>  This is the default.
> -.It Cm down
> +.It Ic down
>  Stop the interface from forwarding packets.
>  .El
>  .Pp
>  A
> -.Cm local
> +.Ic local
>  interface will auto-generate an IPv4 subnet for the interface,
>  configure a gateway address on the VM host side,
>  and run a simple DHCP/BOOTP server for the VM.
>  This option can be used for layer 3 mode without configuring a switch.
>  .Pp
>  If the global
> -.Cm local inet6
> +.Ic local inet6
>  option is enabled, a routable IPv6 gateway address will be generated
>  on the host side.
>  Unlike the IPv4 option,
> @@ -294,20 +296,23 @@ does not respond to DHCPv6 or router solicitation mess
>  Use
>  .Xr rad 8
>  listening on the interface group, e.g.\&
> -.Ar interface tap
> +.Ic interface Cm tap
>  for auto-configuring 

Re: aucat.1: Improve description

2022-10-13 Thread Jason McIntyre
On Wed, Oct 12, 2022 at 08:51:10PM -0400, Josiah Frentsos wrote:
> Index: aucat.1
> ===
> RCS file: /cvs/src/usr.bin/aucat/aucat.1,v
> retrieving revision 1.117
> diff -u -p -r1.117 aucat.1
> --- aucat.1   7 Mar 2022 09:04:45 -   1.117
> +++ aucat.1   13 Oct 2022 00:49:47 -
> @@ -19,7 +19,7 @@
>  .Os
>  .Sh NAME
>  .Nm aucat
> -.Nd audio files manipulation tool
> +.Nd manipulate audio files
>  .Sh SYNOPSIS
>  .Nm aucat
>  .Op Fl dn
> 

i think i prefer it as-is. it says what it is, not what it does. i might
be inclined to shave the "s" off "files" though...

jmc



Re: ps.1: control terminal -> controlling terminal

2022-10-13 Thread Jason McIntyre
On Tue, Oct 11, 2022 at 07:23:45PM -0400, Josiah Frentsos wrote:
> Index: ps.1
> ===
> RCS file: /cvs/src/bin/ps/ps.1,v
> retrieving revision 1.128
> diff -u -p -r1.128 ps.1
> --- ps.1  3 Sep 2022 15:59:04 -   1.128
> +++ ps.1  11 Oct 2022 23:20:34 -
> @@ -443,7 +443,8 @@ information:
>  .Pp
>  .Bl -tag -width indent -compact
>  .It +
> -The process is in the foreground process group of its control terminal.
> +The process is in the foreground process group of its controlling
> +terminal.

hi. i'm not super up on the terminology here, but i do see we still have
other pages that talk about "control terminal". if any developer wants
to signal a clear desire to make such changes we can do that.

jmc

>  .It \*(Lt
>  The process has a raised CPU
>  scheduling priority (see
> @@ -508,7 +509,7 @@ Saved GID from a setgid executable.
>  .It Cm svuid
>  Saved UID from a setuid executable.
>  .It Cm tdev
> -Control terminal device number.
> +Controlling terminal device number.
>  .It Cm tid
>  Thread ID.
>  Used together with
> @@ -518,11 +519,11 @@ Alias:
>  .Cm cputime .
>  Accumulated CPU time, user + system.
>  .It Cm tpgid
> -Control terminal process group ID.
> +Controlling terminal process group ID.
>  .\".It trss
>  .\"Text resident set size, in Kilobytes.
>  .It Cm tsess
> -Control terminal session pointer.
> +Controlling terminal session pointer.
>  .It Cm tsiz
>  Text size, in Kilobytes.
>  .It Cm tt
> @@ -536,7 +537,7 @@ This is followed by a
>  if the process can no longer reach that
>  controlling terminal (i.e. it has been revoked).
>  .It Cm tty
> -Full name of control terminal.
> +Full name of controlling terminal.
>  .It Cm ucomm
>  Alias:
>  .Cm comm .
> 



Re: List SIMCom SIM8262E-M2 as supported for umb(4)

2022-10-08 Thread Jason McIntyre
On Sat, Oct 08, 2022 at 10:40:10PM +0800, Kevin Lo wrote:
> The diff below adds SIMCom SIM8262E-M2 to umb man page.
> 
> Tested:
> umb0 at uhub0 port 18 "SIMCOM SDXLEMUR-LITE-MTP _SN:59A7F2D2" rev 3.20/5.04 
> addr 7
> 
> Using 'AT+CUSBCFG=usbid,1e0e,9003' AT command to switch to MBIM mode.
> ok?
> 

ok.
jmc

> Index: share/man/man4/umb.4
> ===
> RCS file: /cvs/src/share/man/man4/umb.4,v
> retrieving revision 1.14
> diff -u -p -u -p -r1.14 umb.4
> --- share/man/man4/umb.4  24 Sep 2021 05:25:37 -  1.14
> +++ share/man/man4/umb.4  8 Oct 2022 14:17:47 -
> @@ -51,6 +51,7 @@ The following devices should work:
>  .It Medion Mobile S4222 (MediaTek OEM)
>  .It Quectel EC25
>  .It SIMCom SIM7600
> +.It SIMCom SIM8262E-M2
>  .It Sierra Wireless EM7345
>  .It Sierra Wireless EM7455
>  .It Sierra Wireless EM8805
> 



Re: tftp: sort commands, add help to manual

2022-10-02 Thread Jason McIntyre
On Sun, Oct 02, 2022 at 06:05:44PM +, Klemens Nanni wrote:
> Searching for a command in help output is much simpler when sorted.
> The strings can be inlined into the struct while staying under 80 chars.
> 
> Now manual and help output are in the same order, except help folded
> into ? in the manual to avoid duplicate text there.
> 
> Or should help appear at the same spot to make manual and help output
> an exact match order-wise?
> 
> Feedback? OK?
> 

- i'm fine with ordering the output

- as to the order of ? and help, isn;t ? already in the correct place
  being first? so then adding "help" wouldn;t break that?

- i bet most people who use "help" do not single out specific commands,
  especially since the output to screen is minimal. so it would be
  helpful to show "command " as optional:

? | help [command ...]

- i think "command" would be better than "command-name": shorter and
  saner.

jmc

> 
> Index: main.c
> ===
> RCS file: /cvs/src/usr.bin/tftp/main.c,v
> retrieving revision 1.43
> diff -u -p -r1.43 main.c
> --- main.c20 Sep 2018 11:42:42 -  1.43
> +++ main.c1 Oct 2022 19:18:12 -
> @@ -109,23 +109,6 @@ int   opt_tsize = 0;
>  int   opt_tout = 0;
>  int   opt_blksize = 0;
>  
> -char vhelp[] = "toggle verbose mode";
> -char thelp[] = "toggle packet tracing";
> -char chelp[] = "connect to remote tftp";
> -char qhelp[] = "exit tftp";
> -char hhelp[] = "print help information";
> -char shelp[] = "send file";
> -char rhelp[] = "receive file";
> -char mhelp[] = "set file transfer mode";
> -char sthelp[] = "show current status";
> -char xhelp[] = "set per-packet retransmission timeout";
> -char ihelp[] = "set total retransmission timeout";
> -char ashelp[] = "set mode to netascii";
> -char bnhelp[] = "set mode to octet";
> -char oshelp[] = "toggle tsize option";
> -char othelp[] = "toggle timeout option";
> -char obhelp[] = "set alternative blksize option";
> -
>  struct cmd {
>   char*name;
>   char*help;
> @@ -133,23 +116,23 @@ struct cmd {
>  };
>  
>  struct cmd cmdtab[] = {
> - { "connect",chelp,  parsearg },
> - { "mode",   mhelp,  modecmd },
> - { "put",shelp,  put },
> - { "get",rhelp,  get },
> - { "quit",   qhelp,  quit },
> - { "verbose",vhelp,  setverbose },
> - { "trace",  thelp,  settrace },
> - { "status", sthelp, status },
> - { "binary", bnhelp, setbinary },
> - { "ascii",  ashelp, setascii },
> - { "rexmt",  xhelp,  setrexmt },
> - { "timeout",ihelp,  settimeout },
> - { "tsize",  oshelp, settsize },
> - { "tout",   othelp, settout },
> - { "blksize",obhelp, setblksize },
> - { "help",   hhelp,  help },
> - { "?",  hhelp,  help },
> + { "?",  "print help information",   help },
> + { "ascii",  "set mode to netascii", setascii },
> + { "binary", "set mode to octet",setbinary },
> + { "blksize","set alternative blksize option",   setblksize },
> + { "connect","connect to remote tftp",   parsearg },
> + { "get","receive file", get },
> + { "help",   "print help information",   help },
> + { "mode",   "set file transfer mode",   modecmd },
> + { "put","send file",put },
> + { "quit",   "exit tftp",quit },
> + { "rexmt",  "set per-packet retransmission timeout", setrexmt },
> + { "status", "show current status",  status },
> + { "timeout","set total retransmission timeout", settimeout },
> + { "tout",   "toggle timeout option",settout },
> + { "trace",  "toggle packet tracing",settrace },
> + { "tsize",  "toggle tsize option",  settsize },
> + { "verbose","toggle verbose mode",  setverbose },
>   { NULL, NULL,   NULL }
>  };
>  
> Index: tftp.1
> ===
> RCS file: /cvs/src/usr.bin/tftp/tftp.1,v
> retrieving revision 1.20
> diff -u -p -r1.20 tftp.1
> --- tftp.11 May 2012 04:23:21 -   1.20
> +++ tftp.11 Oct 2022 19:18:14 -
> @@ -62,7 +62,7 @@ is running, it issues the prompt
>  and recognizes the following commands:
>  .Pp
>  .Bl -tag -width verbose -compact
> -.It Ic \&? Ar command-name ...
> +.It Ic \&? Ns | Ns Ic help Ar command-name ...
>  Print help information.
>  .Pp
>  .It Ic ascii
> 



Re: rarpd: clarify synopsis

2022-10-02 Thread Jason McIntyre
On Sun, Oct 02, 2022 at 01:07:04PM +, Klemens Nanni wrote:
> rarpd(8) either "Listen[s] on all the Ethernets attached to the system"
> or requires an explicit list, not both:
> 
>   $ rarpd -a em0
>   usage: rarpd [-adflt] if0 [... ifN]
>   $ ./obj/rarpd -a em0
>   usage: rarpd [-dflt] -a | if ...
> 
> Or would this be better?
>   rarpd [-dflt] if ...
>   rarpd -a [-dflt]
> 
> Feedback? OK?
> 

please don't!

- if you are specifying -a, you would hardly expect to give a list of
  interfaces too. the manual documents it clearly. why single out -a?

- with the newer version, it is unclear whether you can specify any
  flags at all with "if ...". we could tighten that, but it's still
  messy.

- and splitting such a simple SYNOPSIS in two would be nuts.

- if anything, i think we could trim "if0 [... ifN]" to just "if ...".
  so i agree with that part.

jmc

> Index: rarpd.8
> ===
> RCS file: /cvs/src/usr.sbin/rarpd/rarpd.8,v
> retrieving revision 1.21
> diff -u -p -r1.21 rarpd.8
> --- rarpd.8   28 Oct 2015 10:02:59 -  1.21
> +++ rarpd.8   29 Sep 2022 21:04:29 -
> @@ -29,8 +29,8 @@
>  .Nd reverse ARP daemon
>  .Sh SYNOPSIS
>  .Nm rarpd
> -.Op Fl adflt
> -.Ar if0 Op Ar ... ifN
> +.Op Fl dflt
> +.Fl a | Ar if ...
>  .Sh DESCRIPTION
>  .Nm
>  services Reverse ARP requests on the Ethernet connected to
> Index: rarpd.c
> ===
> RCS file: /cvs/src/usr.sbin/rarpd/rarpd.c,v
> retrieving revision 1.79
> diff -u -p -r1.79 rarpd.c
> --- rarpd.c   15 Nov 2021 15:14:24 -  1.79
> +++ rarpd.c   29 Sep 2022 21:05:35 -
> @@ -217,7 +217,7 @@ init_all(void)
>  __dead void
>  usage(void)
>  {
> - (void) fprintf(stderr, "usage: rarpd [-adflt] if0 [... ifN]\n");
> + fprintf(stderr, "usage: rarpd [-dflt] -a | if ...\n");
>   exit(1);
>  }
>  
> 



Re: swab.3: Use Fn consistently

2022-09-28 Thread Jason McIntyre
On Tue, Sep 27, 2022 at 06:13:20PM -0400, Josiah Frentsos wrote:
> Index: swab.3
> ===

fixed, thanks.

also just to add: i have taken note of your second vm.conf.5 diff.
however since i've come to dislike both macros (and how one always seems
as good as the other) i've asked for some advice on whether to make
these changes. i.e. it hasn;t been forgotten!

jmc

> RCS file: /cvs/src/lib/libc/string/swab.3,v
> retrieving revision 1.9
> diff -u -p -r1.9 swab.3
> --- swab.312 Dec 2014 20:06:13 -  1.9
> +++ swab.327 Sep 2022 22:09:45 -
> @@ -42,9 +42,9 @@
>  .Fa "ssize_t len"
>  .Fc
>  .Sh DESCRIPTION
> -The function
> +The
>  .Fn swab
> -copies
> +function copies
>  .Fa len
>  bytes from the location referenced by
>  .Fa src
> @@ -55,7 +55,7 @@ swapping adjacent bytes.
>  If
>  .Fa len
>  is zero or less,
> -.Nm
> +.Fn swab
>  does nothing.
>  If it is odd, what happens to the last byte is unspecified.
>  If
> @@ -68,7 +68,7 @@ overlap, behaviour is undefined.
>  .Xr memset 3
>  .Sh STANDARDS
>  The
> -.Nm
> +.Fn swab
>  function is compliant with the X/Open System Interfaces option of the
>  .St -p1003.1-2008
>  specification.
> 



Re: vm.conf.5: Use the proper macros

2022-09-24 Thread Jason McIntyre
On Sat, Sep 24, 2022 at 10:09:06AM -0400, Josiah Frentsos wrote:
> --- vm.conf.5
> +++ vm.conf.5
> @@ -25,8 +25,7 @@
>  .Nm
>  is the configuration file to configure the virtual machine monitor
>  (VMM) subsystem.
> -A VMM manages virtual machines (VMs) on a
> -.Ar host .
> +A VMM manages virtual machines (VMs) on a host.
>  The VMM subsystem is responsible for creating, destroying, and
>  executing VMs.
>  .Pp
> @@ -45,8 +44,7 @@ Configuration for each individual virtual machine.
>  Configuration for virtual switches.
>  .El
>  .Pp
> -Within the sections,
> -the
> +Within the sections, the
>  .Ar bytes
>  argument can be specified with a human-readable scale,
>  using the format described in
> @@ -91,7 +89,7 @@ vm "vm1.example.com" {
>  .Sh GLOBAL CONFIGURATION
>  The following setting can be configured globally:
>  .Bl -tag -width Ds
> -.It Ic agentx Oo Ic context Ar context Oc Oo Ic path Ar path Oc
> +.It Ic agentx Oo Ic context Ar context Oc Op Ic path Ar path
>  Export vm metrics via an AgentX compatible
>  .Pq snmp
>  daemon by connecting to
> @@ -102,32 +100,29 @@ If
>  .Ar path
>  is omitted it will default to
>  .Pa /var/agentx/master .
> -.Ar Context
> +.Ar context
>  is the SNMPv3 context and can usually be omitted.
> -.It Ic local prefix Ar address Ns Li / Ns Ar prefix
> +.It Ic local prefix Ar address Ns / Ns Ar prefix
>  Set the network prefix that is used to allocate subnets for
>  local interfaces, see
>  .Ic local interface
>  in the
>  .Sx VM CONFIGURATION
>  section below.
> -The default is
> -.Ar 100.64.0.0/10 .
> -.It Ic local inet6 Op Ic prefix Ar address Ns Li / Ns Ar prefix
> +The default is 100.64.0.0/10.
> +.It Ic local inet6 Op Ic prefix Ar address Ns / Ns Ar prefix
>  Enable IPv6 on local interfaces and allocate routable subnets.
>  If the prefix is not specified,
>  a random prefix from the
>  .Dq unique local
> -network range
> -.Ar fd00::/8
> -will be generated on startup.
> +network range fd00::/8 will be generated on startup.
>  The specified prefix length must be /64 or smaller.
>  .It Cm socket owner Ar user : Ns Ar group
>  Set the control socket owner to the specified user and group.
>  Users with access to the control socket will be allowed to use
> -.Nm vmctl
> +.Xr vmctl 8
>  for restricted access to
> -.Nm vmd .
> +.Xr vmd 8 .
>  If only
>  .Ar user
>  is given,
> @@ -136,8 +131,7 @@ If only
>  .Pf : Ar group
>  is given,
>  only the group is set.
> -The default is
> -.Ar root : Ns Ar wheel .
> +The default is root:wheel.
>  .It Ic staggered start parallel Ar parallelism Ic delay Ar seconds
>  Start all configured VMs in a staggered fashion with
>  .Ar parallelism
> @@ -295,7 +289,7 @@ If the global
>  option is enabled, a routable IPv6 gateway address will be generated
>  on the host side.
>  Unlike the IPv4 option,
> -.Nm vmd
> +.Xr vmd 8
>  does not respond to DHCPv6 or router solicitation messages itself.
>  Use
>  .Xr rad 8
> @@ -343,7 +337,7 @@ except for exclusive options such as
>  .Ic disk ,
>  .Ic interface lladdr ,
>  or
> -.Ic interface name .
> +.Ic interface Ar name .
>  The configuration options are identical to the
>  .Sx VM CONFIGURATION ,
>  but restricted to the allowed instance options.
> @@ -431,7 +425,7 @@ is specified.
>  .It Cm locked lladdr
>  If this option is specified,
>  .Xr vmd 8
> -will drop packets with altered sources addresses that do not match the
> +will drop packets with altered source addresses that do not match the
>  link layer addresses (MAC addresses) of the VM interfaces in this switch.
>  .It Cm disable
>  Do not configure this switch.
> @@ -470,7 +464,7 @@ Stop the switch from forwarding packets.
>  Create a new VM with 1GB memory, 1 network interface connected to
>  .Dq uplink ,
>  with one disk image
> -.Sq /home/joe/vm2-disk.img ,
> +.Pa /home/joe/vm2-disk.img ,
>  owned by user
>  .Sq joe :
>  .Bd -literal -offset indent
> 

fixed, thanks.
jmc



Re: execve.2: Use the proper macros for the #! line

2022-09-24 Thread Jason McIntyre
On Fri, Sep 23, 2022 at 10:04:45AM -0400, Josiah Frentsos wrote:
> Index: execve.2
> ===
> RCS file: /cvs/src/lib/libc/sys/execve.2,v
> retrieving revision 1.56
> diff -u -p -r1.56 execve.2
> --- execve.2  31 Mar 2022 17:27:16 -  1.56
> +++ execve.2  23 Sep 2022 14:01:14 -
> @@ -58,22 +58,19 @@ with zero data; see
>  .Xr elf 5 .
>  .Pp
>  An interpreter file begins with a line of the form:
> -.Bd -filled -offset indent
> -.Sy #!\&
> -.Em interpreter
> -.Bq Em arg
> -.Ed
> +.Pp
> +.D1 #! Ar interpreter Op Ar arg
>  .Pp
>  When an interpreter file is passed to
>  .Fn execve ,
>  the system instead calls
>  .Fn execve
>  with the specified
> -.Em interpreter .
> +.Ar interpreter .
>  If the optional
> -.Em arg
> +.Ar arg
>  is specified, it becomes the first argument to the
> -.Em interpreter ,
> +.Ar interpreter ,
>  and the original
>  .Fa path
>  becomes the second argument;
> @@ -207,9 +204,8 @@ see
>  When a program is executed as a result of an
>  .Fn execve
>  call, it is entered as follows:
> -.Bd -literal -offset indent
> -main(int argc, char **argv, char **envp)
> -.Ed
> +.Pp
> +.Dl main(int argc, char **argv, char **envp)
>  .Pp
>  where
>  .Fa argc
> @@ -291,7 +287,7 @@ is allowed by the imposed maximum
>  The number of bytes in the new process's argument list
>  is larger than the system-imposed limit.
>  The limit in the system as released is 524288 bytes
> -.Pf ( Dv ARG_MAX ) .
> +.Pq Dv ARG_MAX .
>  .It Bq Er EFAULT
>  The new process file is not as long as indicated by
>  the size values in its header.
> @@ -309,7 +305,7 @@ did not contain at least one element.
>  An I/O error occurred while reading from the file system.
>  .It Bq Er ENFILE
>  During startup of an
> -.Em interpreter ,
> +.Ar interpreter ,
>  the system file table was found to be full.
>  .El
>  .Sh SEE ALSO
> 

fixed, thanks.
jmc



Re: vm.conf.5: Use the proper macros

2022-09-24 Thread Jason McIntyre
On Fri, Sep 23, 2022 at 05:41:41PM -0400, Josiah Frentsos wrote:
> Index: vm.conf.5
> ===

hi. some comments, inline:

> RCS file: /cvs/src/usr.sbin/vmd/vm.conf.5,v
> retrieving revision 1.59
> diff -u -p -r1.59 vm.conf.5
> --- vm.conf.5 13 Sep 2022 10:28:19 -  1.59
> +++ vm.conf.5 23 Sep 2022 19:36:01 -
> @@ -25,8 +25,7 @@
>  .Nm
>  is the configuration file to configure the virtual machine monitor
>  (VMM) subsystem.
> -A VMM manages virtual machines (VMs) on a
> -.Ar host .
> +A VMM manages virtual machines (VMs) on a host.
>  The VMM subsystem is responsible for creating, destroying, and
>  executing VMs.
>  .Pp
> @@ -45,8 +44,7 @@ Configuration for each individual virtua
>  Configuration for virtual switches.
>  .El
>  .Pp
> -Within the sections,
> -the
> +Within the sections, the
>  .Ar bytes
>  argument can be specified with a human-readable scale,
>  using the format described in
> @@ -91,7 +89,11 @@ vm "vm1.example.com" {
>  .Sh GLOBAL CONFIGURATION
>  The following setting can be configured globally:
>  .Bl -tag -width Ds
> -.It Ic agentx Oo Ic context Ar context Oc Oo Ic path Ar path Oc
> +.It Xo
> +.Ic agentx
> +.Op Ic context Ar context
> +.Op Ic path Ar path
> +.Xc

in the past, we had to use Xo/Xc when dealing with long argument lists.
that is no longer the case, so Xo/Xc now is used less. in cases like
this, using them is basically adding extra macros, but gaining the
benefit of potentially (depending on where you stand) making the doc
source look tidier.

personally i would make a change like this only if all the other list
items were formatted this way. but here they are not, so i would not.

you could however replace the final Oo/Oc with a single Op.

>  Export vm metrics via an AgentX compatible
>  .Pq snmp
>  daemon by connecting to
> @@ -102,9 +104,9 @@ If
>  .Ar path
>  is omitted it will default to
>  .Pa /var/agentx/master .
> -.Ar Context
> +.Ar context
>  is the SNMPv3 context and can usually be omitted.
> -.It Ic local prefix Ar address Ns Li / Ns Ar prefix
> +.It Ic local prefix Ar address Ns / Ns Ar prefix
>  Set the network prefix that is used to allocate subnets for
>  local interfaces, see
>  .Ic local interface
> @@ -112,22 +114,23 @@ in the
>  .Sx VM CONFIGURATION
>  section below.
>  The default is
> -.Ar 100.64.0.0/10 .
> -.It Ic local inet6 Op Ic prefix Ar address Ns Li / Ns Ar prefix
> +.Cm 100.64.0.0/10 .

i don;t think either Ar or Cm really make sense. i would either quote it
(without using a macro) or not add any punctuation or mark up at all.

> +.It Ic local inet6 Op Ic prefix Ar address Ns / Ns Ar prefix
>  Enable IPv6 on local interfaces and allocate routable subnets.
>  If the prefix is not specified,
>  a random prefix from the
>  .Dq unique local
> -network range
> -.Ar fd00::/8
> -will be generated on startup.
> +network range fd00::/8 will be generated on startup.

so here you have done it without punctuation/mark up ;) that's what i'd
do too, above.

>  The specified prefix length must be /64 or smaller.
> -.It Cm socket owner Ar user : Ns Ar group
> -Set the control socket owner to the specified user and group.
> +.It Ic socket owner Ar user : Ns Ar group

i'd have to look seperately at the Ic/Cm change to try and decide what
makes sense where. to that end, i'd rather a diff for such changes was
mailed seperately.

> +Set the control socket owner to the specified
> +.Ar user
> +and
> +.Ar group .
>  Users with access to the control socket will be allowed to use
> -.Nm vmctl
> +.Xr vmctl 8
>  for restricted access to
> -.Nm vmd .
> +.Xr vmd 8 .
>  If only
>  .Ar user
>  is given,
> @@ -137,7 +140,7 @@ If only
>  is given,
>  only the group is set.
>  The default is
> -.Ar root : Ns Ar wheel .
> +.Cm root:wheel .

again, i would use no mark up, or quote it if you must.

>  .It Ic staggered start parallel Ar parallelism Ic delay Ar seconds
>  Start all configured VMs in a staggered fashion with
>  .Ar parallelism
> @@ -166,28 +169,28 @@ Typically this is a hostname.
>  .Pp
>  Followed by a block of parameters that is enclosed in curly brackets:
>  .Bl -tag -width Ds
> -.It Cm allow instance Brq ...
> +.It Ic allow instance Brq ...
>  Set the permissions to create VM instances.
>  See
>  .Sx VM INSTANCES .
> -.It Cm boot Ar path
> +.It Ic boot Ar path
>  Kernel or BIOS image to load when booting the VM.
>  If not specified, the default is to boot using the BIOS image in
>  .Pa /etc/firmware/vmm-bios .
> -.It Cm boot device Ar device
> +.It Ic boot device Ar device
>  Force VM to boot from
>  .Ar device .
>  Valid values are:
>  .Bl -tag -width "cdrom"
> -.It Ar cdrom
> +.It Cm cdrom
>  Boot the ISO image file specified using the
>  .Ic cdrom
>  parameter.
> -.It Ar disk
> +.It Cm disk
>  Boot from the disk image file specified using the
>  .Ic disk
>  parameter.
> -.It Ar net
> +.It Cm net
>  Boot the kernel specified using the
>  .Ic boot
>  parameter as if the VM was network 

Re: cp.1: zap redundant info

2022-09-20 Thread Jason McIntyre
On Tue, Sep 20, 2022 at 08:37:27AM -0300, Crystal Kolipe wrote:
> On Tue, Sep 20, 2022 at 10:54:10AM +, Klemens Nanni wrote:
> > Does this negation of the main sentence add anything I don't get?
> 
> Yes.  The wording you are proposing to remove makes it clear that
> setting -R sets the 'default' behaviour, (which can be overridden
> by other flags), rather than forcing the behaviour regardless of
> any following flags.
> 
> This is important due to the way that the rest of the paragraph
> is written, (see below).
> 

i kind of agree with this point.

> > Reads like pointing out the obvious and the next sentence also explains
> > how -H and -L behave due to -R, just like -H and -L descriptions
> > themselves.
> 
> That's true if you only read the first two sentences, but taking the
> paragraph as a whole it goes on to say that:
> 
> "The -H, -L, and -P options are ignored unless the -R option is
> specified.  In addition, these options override each other and the
> command's actions are determined by the last one specified."
> 
> This is ambiguous.  Which options does that text suggest override
> each other?
> 

however it is not ambiguous here. it doesn;t make sense to think that
"these options override each other" could refer to -R, since we have
already said the options are ignored unless you specify -R.

> Is it:
> 
> 1. -H, -L, and -P ?
> 

yes

> or
> 
> 2. -H, -L, -P, and -R ?
> 

-R could not both override -H, for example, and simultaneously be required
to make -H work.

> The text is not clear.  Take this example:
> 

i think it is clear.

jmc

> # cp -L -R 
> 
> The -R does not override the -L.
> 
> This is consistent with the current wording of the manual page,
> I.E. -R sets the DEFAULT which can be overridden by -L, but an
> -R coming after an -L is only setting the DEFAULT which can and
> has been overridden by a previous -L.
> 
> BUT with the sentence you are proposing to remove, this implication
> is lost, and it's less clear whether a tailing -R will override a
> previous -L.
> 
> If you want to make your proposed change, you should also change
> "these options override each other" to "the first three options
> override each other".
> 



Re: iostat.8 wording

2022-09-17 Thread Jason McIntyre
On Thu, Sep 15, 2022 at 04:43:19PM +0100, Jason McIntyre wrote:
> On Thu, Sep 15, 2022 at 04:41:57PM +0200, Jan Stary wrote:
> > I believe this reads a little bit better.
> > 
> > Jan
> > 
> 
> i agree, but i'd leave those commas in.
> jmc
> 

i went ahead and committed your diff, with commas.
jmc



Re: iostat.8 wording

2022-09-15 Thread Jason McIntyre
On Thu, Sep 15, 2022 at 04:41:57PM +0200, Jan Stary wrote:
> I believe this reads a little bit better.
> 
>   Jan
> 

i agree, but i'd leave those commas in.
jmc

> Index: iostat.8
> ===
> RCS file: /cvs/src/usr.sbin/iostat/iostat.8,v
> retrieving revision 1.27
> diff -u -p -r1.27 iostat.8
> --- iostat.8  7 Sep 2018 12:54:44 -   1.27
> +++ iostat.8  15 Sep 2022 14:41:05 -
> @@ -150,8 +150,9 @@ Transfers per second
>  .It MB/s
>  Megabytes transferred per second
>  .El
> -The alternate display format, (selected with
> -.Fl D ) ,
> +.Pp
> +The alternate display format selected with
> +.Fl D
>  presents the following values:
>  .Pp
>  .Bl -tag -width indent -compact
> 



Re: man sed(1): instructions wrt whitespace in functions

2022-09-15 Thread Jason McIntyre
On Wed, Sep 14, 2022 at 11:51:41AM +0200, Luka Krmpoti?? wrote:
> section "DESCRIPTION" of sed man(1) page, says
> >The form of a sed command is as follows:
> >[address[,address]]function[arguments]
> >Whitespace may be inserted before the first address and the function
> >portions of the command.
> https://github.com/openbsd/src/blob/16748403c325ab5b4e9457bf8f0879a6698daba9/usr.bin/sed/sed.1#L138-L139
> 
> I don't understand where this whitespace would go, perhaps it should say:
> >Whitespace may be inserted between the address and the function
> >portions of the command.
> 

hi.

i think you should send a diff to say what you think it should say.

jmc

> if I use a `-f command_file` I tested that I can indeed insert a whitespace
> between address & function portions, e.g. `1,3p` as well as `1,3 p` work.
> 
> For this and the following mentions of whitespace, I have not managed
> to make whitespace work when command was given as an argument
> (either alone or part of -e flag). In my tests, I could insert whitespaces
> in sed commands only in `command_file`. This behavior is not mentioned
> in the man page.
> 
> section "SED FUNCTIONS":
> >The r and w functions, as well as the w flag to the s function, take a
> >file parameter, which should be separated from the function or flag by
> >whitespace.
> 
> The r & w & s (with w flag) functions work also if file parameter is NOT
> separated, while
> if it IS separated by whitespace, they only work as part of `command_file`.
> 
> perhaps, the instruction should read something like
> >The r and w functions, as well as the w flag to the s function, take a
> >file parameter, which can be separated from the function or flag by
> >whitespace in `command_file`.
> 
> I haven't looked into IEEE specification, perhaps the word "should"
> applies to that, and the sentence should be left as is.
> 
> then we have
> >The b, r, s, t, w, y, and : functions all accept additional arguments.
> >The synopses below indicate which arguments have to be separated from the
> >function letters by whitespace characters.
> >
> >[2addr]b [label]
> >[1addr]r file
> >[2addr]s/RE/replacement/flags
> >[2addr]t [label]
> >[2addr]w file
> >[2addr]y/string1/string2/
> >[0addr]:label
> 
> again, (b,r,s,t,w) functions work without whitespace separation of
> arguments,
> while with whitespace only as part of `command_file`
> so why does it say `have to` (again, maybe because of IEEE spec?).
> 
> maybe the wording should be
> >The b, r, s, t, w, y, and : functions all accept additional arguments.
> >The synopses below indicate which arguments can be separated from the
> >function letters by whitespace character in `command_file`
> 
> In short, it is frustrating for someone learning sed, testing the sed
> functions using
> command argument (alone or part of -e), to be told to insert whitespace
> when this only works as part of `command_file`.
> 
> Best,
> Luka
> 
> P.S.
> I appreciate my suggestions getting replies, unfortunately I'm struggling
> with mail. I don't receive any replies in my inbox, and have to check
> https://marc.info/?l=openbsd-tech to see them.



Re: man sed(1), fix comment about two addresses

2022-09-14 Thread Jason McIntyre
On Wed, Sep 14, 2022 at 07:00:52AM +, Klemens Nanni wrote:
> On Wed, Sep 14, 2022 at 06:48:48AM +0100, Jason McIntyre wrote:
> > On Wed, Sep 14, 2022 at 12:40:55AM +0200, Luka Krmpoti?? wrote:
> > > sed's man(1) page, section "sed addresses", has a note:
> > > 
> > > https://github.com/openbsd/src/blob/16748403c325ab5b4e9457bf8f0879a6698daba9/usr.bin/sed/sed.1#L175-L176
> > > >  (If the second address is a number less than or equal to the line 
> > > > number
> > > first selected, only that line is selected.)
> > > 
> > > to me, this makes it sound as if the second address would be selected,
> > > so as if in the range `3,1` line 1 would be selected, when in actuality it
> > > is line 3
> > > ```ksh
> > > $ sed -n 3,1p < > > > one
> > > > two
> > > > three
> > > > EOF
> > > three
> > > ```
> > > I recommend the note to be made clearer, by being explicit about "that 
> > > line"
> > > > (If the second address is a number less than or equal to the line number
> > > first selected, only the first address is selected.)
> > > 
> > > Best,
> > > Luka
> > > 
> > > P.S.
> > > it is after midnight here
> > 
> > hi.
> > 
> > i rather think i agree. diff below to address that. in addition, i don;t
> > think it helpes having that entire sentence in brackets, so i removed
> > them.
> > 
> > will let this sit a little in case of feedback.
> > jmc
> > 
> > Index: sed.1
> > ===
> > RCS file: /cvs/src/usr.bin/sed/sed.1,v
> > retrieving revision 1.61
> > diff -u -p -r1.61 sed.1
> > --- sed.1   3 Aug 2022 08:16:50 -   1.61
> > +++ sed.1   14 Sep 2022 05:47:07 -
> > @@ -172,8 +172,8 @@ that match the address.
> >  A command line with two addresses selects the inclusive range from
> >  the first pattern space that matches the first address through the next
> >  pattern space that matches the second.
> > -(If the second address is a number less than or equal to the line number
> > -first selected, only that line is selected.)
> > +If the second address is a number less than or equal to the line number
> > +first selected, only the first line is selected.
> 
> I'd stick with Luka's "only the first address is selected" to be clear.
> 
> OK kn with that tweak.
> 
> Doesn't make much sense but "the first line" could be the first line in
> the file/input, whereas "the first address" is pretty clear to be the
> address one specified with N,M.
> 
> Agree wrt. parentheses.
> 

oh, thanks. that was my mistake!
committed with that adjustment.

jmc



  1   2   3   4   5   6   7   8   9   10   >