On Sun, Oct 02, 2022 at 01:07:04PM +0000, 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 -0000 1.21
> +++ rarpd.8 29 Sep 2022 21:04:29 -0000
> @@ -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 -0000 1.79
> +++ rarpd.c 29 Sep 2022 21:05:35 -0000
> @@ -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);
> }
>
>