diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2007-11-29 11:38:47 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2007-11-29 11:38:47 +0000 |
commit | 6eda715f7110eb42f060404f5fa235d96415e5a5 (patch) | |
tree | 0e40f5767655c816c66bf6b074a2cd17798e173f /libexec/tftpd | |
parent | 267280727dfed6c57d48878f5ef3182f7d877dd8 (diff) |
- get synopsis/usage() right
- improve options text
no one objected...
Diffstat (limited to 'libexec/tftpd')
-rw-r--r-- | libexec/tftpd/tftpd.8 | 39 | ||||
-rw-r--r-- | libexec/tftpd/tftpd.c | 7 |
2 files changed, 20 insertions, 26 deletions
diff --git a/libexec/tftpd/tftpd.8 b/libexec/tftpd/tftpd.8 index b1970c8885f..6bc540cb906 100644 --- a/libexec/tftpd/tftpd.8 +++ b/libexec/tftpd/tftpd.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tftpd.8,v 1.24 2007/11/27 15:13:08 jmc Exp $ +.\" $OpenBSD: tftpd.8,v 1.25 2007/11/29 11:38:46 jmc Exp $ .\" .\" Copyright (c) 1983, 1991 The Regents of the University of California. .\" All rights reserved. @@ -28,9 +28,9 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)tftpd.8 6.7 (Berkeley) 5/13/91 -.\" $OpenBSD: tftpd.8,v 1.24 2007/11/27 15:13:08 jmc Exp $ +.\" $OpenBSD: tftpd.8,v 1.25 2007/11/29 11:38:46 jmc Exp $ .\" -.Dd $Mdocdate: November 27 2007 $ +.Dd $Mdocdate: November 29 2007 $ .Dt TFTPD 8 .Os .Sh NAME @@ -40,10 +40,11 @@ Trivial File Transfer Protocol server .Sh SYNOPSIS .Nm tftpd +.Op Fl cl .Op Ar directory ... .Nm tftpd -.Op Fl cls -.Op Ar directory +.Op Fl cl +.Fl s Ar directory .Sh DESCRIPTION .Nm is a server which supports the @@ -92,29 +93,21 @@ names are prefixed by one of the given directories. The options are as follows: .Bl -tag -width Ds .It Fl c -If the -.Fl c -flag is used, -.Nm -will allow new files to be created; otherwise uploaded files must already -exist. -Files are created with default permissions allowing anyone to read -or write to them. +Allow new files to be created; +otherwise uploaded files must already exist. +Files are created with default permissions +allowing anyone to read or write to them. .It Fl l -If the -.Fl l -flag is used, the client IP, type of request, and filename are logged using +Log the client IP, type of request, and filename using .Xr syslog 3 with a facility of .Dv LOG_INFO . -.It Fl s -When using the -.Fl s -flag with a directory name, -.Nm -will +.It Fl s Ar directory .Xr chroot 2 -on startup; therefore the remote host is not expected to pass the directory +to +.Ar directory +on startup; +the remote host is not expected to pass the directory as part of the file name to transfer. This option is intended primarily for compatibility with SunOS boot ROMs which do not include a directory name. diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c index a917d10565e..337e7123aed 100644 --- a/libexec/tftpd/tftpd.c +++ b/libexec/tftpd/tftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tftpd.c,v 1.58 2007/11/27 14:44:48 chl Exp $ */ +/* $OpenBSD: tftpd.c,v 1.59 2007/11/29 11:38:46 jmc Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -37,7 +37,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)tftpd.c 5.13 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$OpenBSD: tftpd.c,v 1.58 2007/11/27 14:44:48 chl Exp $"; +static char rcsid[] = "$OpenBSD: tftpd.c,v 1.59 2007/11/29 11:38:46 jmc Exp $"; #endif /* not lint */ /* @@ -156,7 +156,8 @@ struct errmsg { __dead void usage(void) { - syslog(LOG_ERR, "usage: %s [-cls] [directory ...]", __progname); + syslog(LOG_ERR, "usage: %s [-cl] [directory ...]", __progname); + syslog(LOG_ERR, "usage: %s [-cl] -s directory", __progname); exit(1); } |