aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Charnier <charnier@FreeBSD.org>1998-04-06 06:18:32 +0000
committerPhilippe Charnier <charnier@FreeBSD.org>1998-04-06 06:18:32 +0000
commit52e8a120a3785fed061f676f938310309747b7c7 (patch)
treebc21e82ccac6003a641f9b06367634e9558c7b3c
parenta7017d7f9e1ad932e62572ab676f53709acec31b (diff)
Notes
-rw-r--r--usr.bin/rdist/docmd.c13
-rw-r--r--usr.bin/rdist/expand.c4
-rw-r--r--usr.bin/rdist/gram.y4
-rw-r--r--usr.bin/rdist/lookup.c4
-rw-r--r--usr.bin/rdist/main.c5
-rw-r--r--usr.bin/rdist/rdist.16
-rw-r--r--usr.bin/rdist/rshrcmd.c11
-rw-r--r--usr.bin/rdist/server.c6
8 files changed, 34 insertions, 19 deletions
diff --git a/usr.bin/rdist/docmd.c b/usr.bin/rdist/docmd.c
index bb919a9075a5c..2da37c6efd01f 100644
--- a/usr.bin/rdist/docmd.c
+++ b/usr.bin/rdist/docmd.c
@@ -32,9 +32,11 @@
*/
#ifndef lint
-/*static char sccsid[] = "From: @(#)docmd.c 8.1 (Berkeley) 6/9/93";*/
+#if 0
+static char sccsid[] = "From: @(#)docmd.c 8.1 (Berkeley) 6/9/93";
+#endif
static const char rcsid[] =
- "$Id: docmd.c,v 1.9 1997/02/22 19:56:40 peter Exp $";
+ "$Id$";
#endif /* not lint */
#include "defs.h"
@@ -185,13 +187,16 @@ done:
if (sc->sc_type == NOTIFY)
notify(tempfile, rhost, sc->sc_args, 0);
if (!nflag) {
+ struct linkbuf *nextihead;
+
(void) unlink(tempfile);
- for (; ihead != NULL; ihead = ihead->nextp) {
- free(ihead);
+ for (; ihead != NULL; ihead = nextihead) {
+ nextihead = ihead->nextp;
if ((opts & IGNLNKS) || ihead->count == 0)
continue;
log(lfp, "%s: Warning: missing links\n",
ihead->pathname);
+ free(ihead);
}
}
}
diff --git a/usr.bin/rdist/expand.c b/usr.bin/rdist/expand.c
index 497a5516627bc..a98056c3b4a6d 100644
--- a/usr.bin/rdist/expand.c
+++ b/usr.bin/rdist/expand.c
@@ -32,7 +32,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)expand.c 8.1 (Berkeley) 6/9/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include "defs.h"
diff --git a/usr.bin/rdist/gram.y b/usr.bin/rdist/gram.y
index 09f6f68e84189..4040f948a2073 100644
--- a/usr.bin/rdist/gram.y
+++ b/usr.bin/rdist/gram.y
@@ -33,7 +33,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)gram.y 8.1 (Berkeley) 6/9/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include "defs.h"
diff --git a/usr.bin/rdist/lookup.c b/usr.bin/rdist/lookup.c
index dc2f1342e334c..08535503c75ff 100644
--- a/usr.bin/rdist/lookup.c
+++ b/usr.bin/rdist/lookup.c
@@ -32,7 +32,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)lookup.c 8.1 (Berkeley) 6/9/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include "defs.h"
diff --git a/usr.bin/rdist/main.c b/usr.bin/rdist/main.c
index 6bb56a47db6a0..c6ab940e9b8b5 100644
--- a/usr.bin/rdist/main.c
+++ b/usr.bin/rdist/main.c
@@ -35,14 +35,11 @@
static const char copyright[] =
"@(#) Copyright (c) 1983, 1993\n\
The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/9/93";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: main.c,v 1.3 1997/08/05 06:41:26 charnier Exp $";
#endif /* not lint */
#include "defs.h"
diff --git a/usr.bin/rdist/rdist.1 b/usr.bin/rdist/rdist.1
index 2f2fe2b2ec0c9..7ea0d1587d215 100644
--- a/usr.bin/rdist/rdist.1
+++ b/usr.bin/rdist/rdist.1
@@ -39,14 +39,14 @@
.Nd remote file distribution program
.Sh SYNOPSIS
.Nm
-.Op Fl nqbRhivwy
+.Op Fl nqbRhivwyD
.Op Fl P Ar rshcmd
.Op Fl f Ar distfile
.Op Fl d Ar var=value
.Op Fl m Ar host
.Op Ar name ...
.Nm rdist
-.Op Fl nqbRhivwy
+.Op Fl nqbRhivwyD
.Op Fl P Ar rshcmd
.Fl c
.Ar name ...
@@ -191,6 +191,8 @@ not to update files that are younger than the master copy.
This can be used
to prevent newer copies on other hosts from being replaced.
A warning message is printed for files which are newer than the master copy.
+.It Fl D
+Debug mode.
.El
.Pp
.Ar Distfile
diff --git a/usr.bin/rdist/rshrcmd.c b/usr.bin/rdist/rshrcmd.c
index 6d2986b33f6c0..306ef05fe6f81 100644
--- a/usr.bin/rdist/rshrcmd.c
+++ b/usr.bin/rdist/rshrcmd.c
@@ -5,23 +5,18 @@
*/
#ifndef lint
-static char RCSid[] =
-"$Id$";
-#endif
+static const char rcsid[] =
+ "$Id$";
+#endif /* not lint */
#include "defs.h"
#if !defined(DIRECT_RCMD)
-#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <signal.h>
-#include <errno.h>
#include <netdb.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
static char *
xbasename(s)
diff --git a/usr.bin/rdist/server.c b/usr.bin/rdist/server.c
index 37ae9c55fa790..0a403b3b1ff94 100644
--- a/usr.bin/rdist/server.c
+++ b/usr.bin/rdist/server.c
@@ -32,7 +32,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)server.c 8.1 (Berkeley) 6/9/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include <sys/wait.h>
@@ -41,7 +45,7 @@ static char sccsid[] = "@(#)server.c 8.1 (Berkeley) 6/9/93";
#define ack() (void) write(rem, "\0\n", 2)
#define err() (void) write(rem, "\1\n", 2)
-struct linkbuf *ihead; /* list of files with more than one link */
+struct linkbuf *ihead = NULL; /* list of files with more than one link */
char buf[BUFSIZ]; /* general purpose buffer */
char target[BUFSIZ]; /* target/source directory name */
char *tp; /* pointer to end of target name */