Show the actual command line usage in the man page and usage error string.

This commit is contained in:
Archie Cobbs 2000-07-19 17:24:53 +00:00
parent c1110eb673
commit abc3361a8b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63542
2 changed files with 17 additions and 5 deletions

View File

@ -40,7 +40,9 @@
.Nd configure network interface parameters
.Sh SYNOPSIS
.Nm ifconfig
.Ar interface address_family
.Op Fl L
.Ar interface
.Op Ar address_family
.Oo
.Ar address
.Op Ar dest_address
@ -48,6 +50,7 @@
.Op Ar parameters
.Nm ifconfig
.Fl a
.Op Fl L
.Op Fl d
.Op Fl u
.Op Ar address_family
@ -56,6 +59,10 @@
.Op Fl d
.Op Fl u
.Op Ar address_family
.Nm ifconfig
.Op Fl L
.Op Fl d
.Op Fl u
.Sh DESCRIPTION
.Nm Ifconfig
is used to assign an address
@ -407,6 +414,9 @@ The
flag limits this to interfaces that are down, and
.Fl u
limits this to interfaces that are up.
When no arguments are given,
.Fl a
is implied.
.Pp
The
.Fl l

View File

@ -312,17 +312,19 @@ void
usage()
{
#ifndef INET6
fprintf(stderr, "%s\n%s\n%s\n%s\n",
fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
"usage: ifconfig interface address_family [address [dest_address]]",
" [parameters]",
" ifconfig -a [-d] [-u] [address_family]",
" ifconfig -l [-d] [-u] [address_family]");
" ifconfig -l [-d] [-u] [address_family]",
" ifconfig [-d] [-u]");
#else
fprintf(stderr, "%s\n%s\n%s\n%s\n",
fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
"usage: ifconfig [-L] interface address_family [address [dest_address]]",
" [parameters]",
" ifconfig -a [-L] [-d] [-u] [address_family]",
" ifconfig -l [-d] [-u] [address_family]");
" ifconfig -l [-d] [-u] [address_family]",
" ifconfig [-L] [-d] [-u]");
#endif
exit(1);
}