When you see a comment like this, it means it is intentionally
undocumented.

It is the current mechanism shutdown uses.  It could use a different
mechanism in the future.  It is done this way so that noone else depends
on it.  If you document this user-visible, they will come to depend on
it, then we cannot be agile and change the mechanism later.

I don't think we don't want that, so no.

If you persist at going through the tree you'll find about 20 other
instances of this.  It is a fairly common pattern.

-               case 'l':       /* Undocumented; used by shutdown. */


> Hi,
> 
> The following diff adds missing documentation for the -l option of
> reboot(8) as its done in NetBSD.
> 
> Bye,
> Jan
> 
> Index: reboot.8
> ===================================================================
> RCS file: /cvs/src/sbin/reboot/reboot.8,v
> retrieving revision 1.50
> diff -u -p -r1.50 reboot.8
> --- reboot.8  3 Sep 2016 14:25:05 -0000       1.50
> +++ reboot.8  25 Mar 2019 14:12:48 -0000
> @@ -30,7 +30,7 @@
>  .\"
>  .\"  @(#)reboot.8    8.1 (Berkeley) 6/9/93
>  .\"
> -.Dd $Mdocdate: September 3 2016 $
> +.Dd $Mdocdate: March 25 2019 $
>  .Dt REBOOT 8
>  .Os
>  .Sh NAME
> @@ -39,9 +39,9 @@
>  .Nd stopping and restarting the system
>  .Sh SYNOPSIS
>  .Nm halt
> -.Op Fl dnpq
> +.Op Fl dlnpq
>  .Nm reboot
> -.Op Fl dnq
> +.Op Fl dlnq
>  .Sh DESCRIPTION
>  The
>  .Nm halt
> @@ -70,6 +70,10 @@ capturing the state of a corrupted or mi
>  See
>  .Xr savecore 8
>  for information on how to recover this dump.
> +.It Fl l
> +Suppress sending a message via
> +.Xr syslog 3
> +before halting or restarting.
>  .It Fl n
>  Prevent file system cache from being flushed.
>  This option should probably not be used.
> Index: reboot.c
> ===================================================================
> RCS file: /cvs/src/sbin/reboot/reboot.c,v
> retrieving revision 1.38
> diff -u -p -r1.38 reboot.c
> --- reboot.c  22 Aug 2017 00:30:16 -0000      1.38
> +++ reboot.c  25 Mar 2019 14:03:43 -0000
> @@ -94,7 +94,7 @@ main(int argc, char *argv[])
>               case 'd':
>                       howto |= RB_DUMP;
>                       break;
> -             case 'l':       /* Undocumented; used by shutdown. */
> +             case 'l':
>                       lflag = 1;
>                       break;
>               case 'n':
> @@ -272,7 +272,7 @@ restart:
>  void
>  usage(void)
>  {
> -     fprintf(stderr, "usage: %s [-dn%sq]\n", __progname,
> +     fprintf(stderr, "usage: %s [-dln%sq]\n", __progname,
>           dohalt ? "p" : "");
>       exit(1);
>  }
> 

Reply via email to