summaryrefslogtreecommitdiffstats
path: root/libexec/ypxfr/ypxfr_main.c
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-12-08 07:49:56 +0000
committercharnier <charnier@FreeBSD.org>1997-12-08 07:49:56 +0000
commit689d237056a2050716451b53f1b45740d61b4428 (patch)
treed939cafe1574e93270e821824a27a3dbea056e60 /libexec/ypxfr/ypxfr_main.c
parent9a016c78e25d6e9245274ded345e7fa88cf5a906 (diff)
downloadFreeBSD-src-689d237056a2050716451b53f1b45740d61b4428.zip
FreeBSD-src-689d237056a2050716451b53f1b45740d61b4428.tar.gz
Use full path in synopsis. Sort #includes. Use .Tn for NIS.
Diffstat (limited to 'libexec/ypxfr/ypxfr_main.c')
-rw-r--r--libexec/ypxfr/ypxfr_main.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/libexec/ypxfr/ypxfr_main.c b/libexec/ypxfr/ypxfr_main.c
index 1c905cc..b40d5a0 100644
--- a/libexec/ypxfr/ypxfr_main.c
+++ b/libexec/ypxfr/ypxfr_main.c
@@ -28,15 +28,19 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $Id: ypxfr_main.c,v 1.9 1997/03/28 15:48:21 imp Exp $
*/
+
+#ifndef lint
+static const char rcsid[] =
+ "$Id$";
+#endif /* not lint */
+
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <string.h>
#include <syslog.h>
-#include <errno.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
@@ -50,10 +54,6 @@ struct dom_binding {};
#include <rpcsvc/ypxfrd.h>
#include "ypxfr_extern.h"
-#ifndef lint
-static const char rcsid[] = "$Id: ypxfr_main.c,v 1.9 1997/03/28 15:48:21 imp Exp $";
-#endif
-
char *progname = "ypxfr";
char *yp_dir = _PATH_YP;
int _rpcpmstart = 0;
@@ -112,10 +112,10 @@ static void usage()
if (_rpcpmstart) {
ypxfr_exit(YPXFR_BADARGS,NULL);
} else {
- fprintf(stderr,"usage: %s [-f] [-c] [-d target domain] \
-[-h source host] [-s source domain]\n", progname);
- fprintf(stderr,"\t [-p path] [-C taskid program-number \
-ipaddr port] mapname\n");
+ fprintf(stderr, "%s\n%s\n%s\n",
+ "usage: ypxfr [-f] [-c] [-d target domain] [-h source host]",
+ " [-s source domain] [-p path]",
+ " [-C taskid program-number ipaddr port] mapname");
exit(1);
}
}
@@ -160,6 +160,7 @@ int ypxfr_foreach(status, key, keylen, val, vallen, data)
return (0);
}
+int
main(argc,argv)
int argc;
char *argv[];
@@ -185,7 +186,7 @@ main(argc,argv)
debug = 1;
if (!isatty(fileno(stderr))) {
- openlog(progname, LOG_PID, LOG_DAEMON);
+ openlog("ypxfr", LOG_PID, LOG_DAEMON);
_rpcpmstart = 1;
}
OpenPOWER on IntegriCloud