diff options
Diffstat (limited to 'sbin/kldunload')
-rw-r--r-- | sbin/kldunload/kldunload.8 | 8 | ||||
-rw-r--r-- | sbin/kldunload/kldunload.c | 12 |
2 files changed, 14 insertions, 6 deletions
diff --git a/sbin/kldunload/kldunload.8 b/sbin/kldunload/kldunload.8 index 15bbfa2..22e5c61 100644 --- a/sbin/kldunload/kldunload.8 +++ b/sbin/kldunload/kldunload.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: kldunload.8,v 1.3 1998/01/05 07:10:41 charnier Exp $ +.\" $Id: kldunload.8,v 1.4 1998/03/19 07:45:32 charnier Exp $ .\" .Dd April 25, 1997 .Dt KLDUNLOAD 8 @@ -34,8 +34,10 @@ .Sh SYNOPSIS .Nm kldunload .Op Fl v -.Op Fl i Ar id -.Op Fl n Ar name +.Fl i Ar id +.Nm kldunload +.Op Fl v +.Fl n Ar name .Sh DESCRIPTION The .Nm diff --git a/sbin/kldunload/kldunload.c b/sbin/kldunload/kldunload.c index 4a942ed..1d4fb52 100644 --- a/sbin/kldunload/kldunload.c +++ b/sbin/kldunload/kldunload.c @@ -26,7 +26,7 @@ #ifndef lint static const char rcsid[] = - "$Id: kldunload.c,v 1.5 1998/01/05 07:10:42 charnier Exp $"; + "$Id: kldunload.c,v 1.6 1998/07/06 06:59:52 charnier Exp $"; #endif /* not lint */ #include <err.h> @@ -39,7 +39,8 @@ static const char rcsid[] = static void usage(void) { - fprintf(stderr, "usage: kldunload [-v] [-i id] [-n name]\n"); + fprintf(stderr, "usage: kldunload [-v] -i id\n"); + fprintf(stderr, " kldunload [-v] -n name\n"); exit(1); } @@ -68,7 +69,12 @@ main(int argc, char** argv) argc -= optind; argv += optind; - if (argc != 0) + if (!fileid && !filename && (argc == 1)) { + filename = *argv; + argc--; + } + + if (argc != 0 || fileid && filename) usage(); if (fileid == 0 && filename == 0) |