Add rcsid. Remove unused #includes. Add missing prototypes and others -Wall

cleanings. Spelling.
This commit is contained in:
charnier 1998-07-28 06:20:16 +00:00
parent b6fbe55363
commit 821669d2be
9 changed files with 51 additions and 35 deletions

View File

@ -34,32 +34,30 @@
* 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: dirs.c,v 1.10 1997/09/18 14:04:49 phk Exp $
*/
#ifndef lint
#if 0
static char sccsid[] = "@(#)dirs.c 8.7 (Berkeley) 5/1/95";
#endif
static const char rcsid[] =
"$Id$";
#endif /* not lint */
#include <sys/param.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
#include <ufs/ffs/fs.h>
#include <protocols/dumprestore.h>
#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <err.h>
#include <machine/endian.h>
#include "pathnames.h"
#include "restore.h"

View File

@ -31,10 +31,12 @@
* SUCH DAMAGE.
*
* @(#)extern.h 8.2 (Berkeley) 1/7/94
* $Id$
*/
struct entry *addentry __P((char *, ino_t, int));
long addfile __P((char *, ino_t, int));
int addwhiteout __P((char *));
void badentry __P((struct entry *, char *));
void canon __P((char *, char *, int));
void checkrestore __P((void));
@ -44,6 +46,7 @@ void createleaves __P((char *));
void createlinks __P((void));
long deletefile __P((char *, ino_t, int));
void deleteino __P((ino_t));
void delwhiteout __P((struct entry *));
ino_t dirlookup __P((const char *));
void done __P((int)) __dead2;
void dumpsymtable __P((char *, long));

View File

@ -32,16 +32,18 @@
*/
#ifndef lint
#if 0
static char sccsid[] = "@(#)interactive.c 8.5 (Berkeley) 5/1/95";
#endif
static const char rcsid[] =
"$Id$";
#endif /* not lint */
#include <sys/param.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
#include <ufs/ffs/fs.h>
#include <protocols/dumprestore.h>
#include <setjmp.h>
@ -436,7 +438,7 @@ copynext(input, output)
/*
* Canonicalize file names to always start with ``./'' and
* remove any imbedded "." and ".." components.
* remove any embedded "." and ".." components.
*/
void
canon(rawname, canonname, len)
@ -452,7 +454,7 @@ canon(rawname, canonname, len)
else
(void) strcpy(canonname, "./");
if (strlen(canonname) + strlen(rawname) >= len) {
fprintf(stderr, "canonname: not enough bufferspace\n");
fprintf(stderr, "canonname: not enough buffer space\n");
done(1);
}
@ -522,7 +524,7 @@ printlist(name, basename)
}
} else {
entries = 0;
while (dp = rst_readdir(dirp))
while ((dp = rst_readdir(dirp)))
entries++;
rst_closedir(dirp);
list = (struct afile *)malloc(entries * sizeof(struct afile));
@ -538,7 +540,7 @@ printlist(name, basename)
(void) strncpy(locname, name, MAXPATHLEN);
(void) strncat(locname, "/", MAXPATHLEN);
namelen = strlen(locname);
while (dp = rst_readdir(dirp)) {
while ((dp = rst_readdir(dirp))) {
if (dp == NULL)
break;
if (!dflag && TSTINO(dp->d_ino, dumpmap) == 0)

View File

@ -32,28 +32,28 @@
*/
#ifndef lint
static char copyright[] =
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.6 (Berkeley) 5/4/95";
#endif
static const char rcsid[] =
"$Id$";
#endif /* not lint */
#include <sys/param.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#include <protocols/dumprestore.h>
#include <err.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "pathnames.h"
@ -365,7 +365,7 @@ obsolete(argcp, argvp)
}
/* Copy remaining arguments. */
while (*nargv++ = *argv++);
while ((*nargv++ = *argv++));
/* Update argument count. */
*argcp = nargv - *argvp - 1;

View File

@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)restore.8 8.4 (Berkeley) 5/1/95
.\" $Id: restore.8,v 1.11 1997/04/29 17:48:58 wollman Exp $
.\" $Id: restore.8,v 1.12 1998/05/09 05:22:56 jkh Exp $
.\"
.Dd May 1, 1995
.Dt RESTORE 8
@ -269,7 +269,7 @@ tries to determine the media block size dynamically.
Normally,
.Nm restore
will try to determine dynamically whether the dump was made from an
old (pre-4.4) or new format file sytem. The
old (pre-4.4) or new format file system. The
.Fl c
flag disables this check, and only allows reading a dump in the old
format.

View File

@ -32,11 +32,14 @@
*/
#ifndef lint
#if 0
static char sccsid[] = "@(#)restore.c 8.3 (Berkeley) 9/13/94";
#endif
static const char rcsid[] =
"$Id$";
#endif /* not lint */
#include <sys/types.h>
#include <sys/stat.h>
#include <ufs/ufs/dinode.h>
@ -163,7 +166,7 @@ removeoldleaves()
register ino_t i, mydirino;
vprintf(stdout, "Mark entries to be removed.\n");
if (ep = lookupino(WINO)) {
if ((ep = lookupino(WINO))) {
vprintf(stdout, "Delete whiteouts\n");
for ( ; ep != NULL; ep = nextep) {
nextep = ep->e_links;
@ -451,7 +454,7 @@ nodeupdates(name, ino, type)
break;
/*
* A hard link to a diirectory that has been removed.
* A hard link to a directory that has been removed.
* Ignore it.
*/
case NAMEFND:
@ -651,7 +654,7 @@ createleaves(symtabfile)
/*
* If the file is to be extracted, then the old file must
* be removed since its type may change from one leaf type
* to another (eg "file" to "character special").
* to another (e.g. "file" to "character special").
*/
if ((ep->e_flags & EXTRACT) != 0) {
removeleaf(ep);
@ -661,7 +664,7 @@ createleaves(symtabfile)
ep->e_flags &= ~(NEW|EXTRACT);
/*
* We checkpoint the restore after every tape reel, so
* as to simplify the amount of work re quired by the
* as to simplify the amount of work required by the
* 'R' command.
*/
next:
@ -772,7 +775,7 @@ createlinks()
register ino_t i;
char name[BUFSIZ];
if (ep = lookupino(WINO)) {
if ((ep = lookupino(WINO))) {
vprintf(stdout, "Add whiteouts\n");
for ( ; ep != NULL; ep = ep->e_links) {
if ((ep->e_flags & NEW) == 0)

View File

@ -32,7 +32,11 @@
*/
#ifndef lint
#if 0
static char sccsid[] = "@(#)symtab.c 8.3 (Berkeley) 4/28/95";
#endif
static const char rcsid[] =
"$Id$";
#endif /* not lint */
/*
@ -213,7 +217,7 @@ myname(ep)
}
/*
* Unused symbol table entries are linked together on a freelist
* Unused symbol table entries are linked together on a free list
* headed by the following pointer.
*/
static struct entry *freelist = NULL;
@ -257,7 +261,7 @@ addentry(name, inum, type)
if (type & LINK) {
ep = lookupino(inum);
if (ep == NULL)
panic("link to non-existant name\n");
panic("link to non-existent name\n");
np->e_ino = inum;
np->e_links = ep->e_links;
ep->e_links = np;
@ -374,7 +378,7 @@ removeentry(ep)
* of similar lengths can use the same entry. The value of STRTBLINCR
* is chosen so that every entry has at least enough space to hold
* a "struct strtbl" header. Thus every entry can be linked onto an
* apprpriate free list.
* appropriate free list.
*
* NB. The macro "allocsize" below assumes that "struct strhdr"
* has a size that is a power of two.
@ -470,7 +474,7 @@ dumpsymtable(filename, checkpt)
}
clearerr(fd);
/*
* Assign indicies to each entry
* Assign indices to each entry
* Write out the string entries
*/
for (i = WINO; i <= maxino; i++) {

View File

@ -37,12 +37,15 @@
*/
#ifndef lint
#if 0
static char sccsid[] = "@(#)tape.c 8.9 (Berkeley) 5/1/95";
#endif
static const char rcsid[] =
"$Id$";
#endif /* not lint */
#include <sys/param.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/mtio.h>
#include <sys/stat.h>
@ -283,7 +286,7 @@ setup()
* Prompt user to load a new dump volume.
* "Nextvol" is the next suggested volume to use.
* This suggested volume is enforced when doing full
* or incremental restores, but can be overrridden by
* or incremental restores, but can be overridden by
* the user when only extracting a subset of the files.
*/
void

View File

@ -32,7 +32,11 @@
*/
#ifndef lint
#if 0
static char sccsid[] = "@(#)utilities.c 8.5 (Berkeley) 4/28/95";
#endif
static const char rcsid[] =
"$Id$";
#endif /* not lint */
#include <sys/param.h>
@ -43,7 +47,6 @@ static char sccsid[] = "@(#)utilities.c 8.5 (Berkeley) 4/28/95";
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>