resolve conflicts from lite-2 merge

This commit is contained in:
lukem 1997-09-16 13:44:12 +00:00
parent a9c0a86a3c
commit 7120b2eafb
7 changed files with 55 additions and 44 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dirs.c,v 1.29 1997/09/16 08:37:13 mrg Exp $ */
/* $NetBSD: dirs.c,v 1.30 1997/09/16 13:44:12 lukem Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,9 +41,9 @@
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)dirs.c 8.5 (Berkeley) 8/31/94";
static char sccsid[] = "@(#)dirs.c 8.7 (Berkeley) 5/1/95";
#else
__RCSID("$NetBSD: dirs.c,v 1.29 1997/09/16 08:37:13 mrg Exp $");
__RCSID("$NetBSD: dirs.c,v 1.30 1997/09/16 13:44:12 lukem Exp $");
#endif
#endif /* not lint */
@ -52,9 +52,9 @@ __RCSID("$NetBSD: dirs.c,v 1.29 1997/09/16 08:37:13 mrg Exp $");
#include <sys/stat.h>
#include <sys/time.h>
#include <ufs/ffs/fs.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
#include <ufs/ffs/fs.h>
#include <protocols/dumprestore.h>
#include <err.h>
@ -429,7 +429,7 @@ putent(dp)
(void) fwrite(dirbuf, 1, DIRBLKSIZ, df);
dirloc = 0;
}
memcpy(dirbuf + dirloc, dp, (long)dp->d_reclen);
memmove(dirbuf + dirloc, dp, (long)dp->d_reclen);
prev = dirloc;
dirloc += dp->d_reclen;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: interactive.c,v 1.12 1997/09/15 08:04:31 lukem Exp $ */
/* $NetBSD: interactive.c,v 1.13 1997/09/16 13:44:13 lukem Exp $ */
/*
* Copyright (c) 1985, 1993
@ -36,9 +36,9 @@
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)interactive.c 8.3 (Berkeley) 9/13/94";
static char sccsid[] = "@(#)interactive.c 8.5 (Berkeley) 5/1/95";
#else
__RCSID("$NetBSD: interactive.c,v 1.12 1997/09/15 08:04:31 lukem Exp $");
__RCSID("$NetBSD: interactive.c,v 1.13 1997/09/16 13:44:13 lukem Exp $");
#endif
#endif /* not lint */
@ -46,9 +46,9 @@ __RCSID("$NetBSD: interactive.c,v 1.12 1997/09/15 08:04:31 lukem Exp $");
#include <sys/time.h>
#include <sys/stat.h>
#include <ufs/ffs/fs.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
#include <ufs/ffs/fs.h>
#include <protocols/dumprestore.h>
#include <setjmp.h>
@ -541,8 +541,6 @@ printlist(name, basename)
(void) strncat(locname, "/", MAXPATHLEN);
namelen = strlen(locname);
while ((dp = rst_readdir(dirp)) != NULL) {
if (dp == NULL)
break;
if (!dflag && TSTINO(dp->d_ino, dumpmap) == 0)
continue;
if (!vflag && (dp->d_ino == WINO ||
@ -734,7 +732,7 @@ glob_readdir(dirp)
return (NULL);
adirent.d_fileno = dp->d_ino;
adirent.d_namlen = dp->d_namlen;
memcpy(adirent.d_name, dp->d_name, dp->d_namlen + 1);
memmove(adirent.d_name, dp->d_name, dp->d_namlen + 1);
return (&adirent);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.15 1997/09/15 08:04:33 lukem Exp $ */
/* $NetBSD: main.c,v 1.16 1997/09/16 13:44:14 lukem Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,17 +41,17 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
#ifndef lint
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 9/13/94";
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: main.c,v 1.15 1997/09/15 08:04:33 lukem Exp $");
__RCSID("$NetBSD: main.c,v 1.16 1997/09/16 13:44:14 lukem Exp $");
#endif
#endif /* not lint */
#include <sys/param.h>
#include <sys/time.h>
#include <ufs/ffs/fs.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#include <protocols/dumprestore.h>
#include <err.h>
@ -61,6 +61,7 @@ __RCSID("$NetBSD: main.c,v 1.15 1997/09/15 08:04:33 lukem Exp $");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "restore.h"
#include "extern.h"

View File

@ -1,4 +1,4 @@
.\" $NetBSD: restore.8,v 1.16 1997/09/15 08:04:34 lukem Exp $
.\" $NetBSD: restore.8,v 1.17 1997/09/16 13:44:14 lukem Exp $
.\"
.\" Copyright (c) 1985, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)restore.8 8.3 (Berkeley) 6/1/94
.\" @(#)restore.8 8.4 (Berkeley) 5/1/95
.\"
.Dd July 1, 1997
.Dt RESTORE 8
@ -295,6 +295,19 @@ or
.Nm
reads from the named file on the remote host using
.Xr rmt 8 .
If the name of the file is
.Ql Fl ,
.Nm
reads from standard input.
Thus,
.Xr dump 8
and
.Nm
can be used in a pipeline to dump and restore a file system
with the command
.Bd -literal -offset indent
dump 0f - /usr | (cd /mnt; restore xf -)
.Ed
.Pp
.It Fl h
Extract the actual directory,

View File

@ -1,4 +1,4 @@
/* $NetBSD: symtab.c,v 1.12 1997/09/16 08:37:14 mrg Exp $ */
/* $NetBSD: symtab.c,v 1.13 1997/09/16 13:44:15 lukem Exp $ */
/*
* Copyright (c) 1983, 1993
@ -36,9 +36,9 @@
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)symtab.c 8.2 (Berkeley) 9/13/94";
static char sccsid[] = "@(#)symtab.c 8.3 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: symtab.c,v 1.12 1997/09/16 08:37:14 mrg Exp $");
__RCSID("$NetBSD: symtab.c,v 1.13 1997/09/16 13:44:15 lukem Exp $");
#endif
#endif /* not lint */
@ -206,7 +206,7 @@ myname(ep)
for (cp = &namebuf[MAXPATHLEN - 2]; cp > &namebuf[ep->e_namlen]; ) {
cp -= ep->e_namlen;
memcpy(cp, ep->e_name, (long)ep->e_namlen);
memmove(cp, ep->e_name, (long)ep->e_namlen);
if (ep == lookupino(ROOTINO))
return (cp);
*(--cp) = '/';
@ -491,7 +491,7 @@ dumpsymtable(filename, checkpt)
stroff = 0;
for (i = WINO; i <= maxino; i++) {
for (ep = lookupino(i); ep != NULL; ep = ep->e_links) {
memcpy(tep, ep, (long)sizeof(struct entry));
memmove(tep, ep, (long)sizeof(struct entry));
tep->e_name = (char *)stroff;
stroff += allocsize(ep->e_namlen);
tep->e_parent = (struct entry *)(long)

View File

@ -1,4 +1,4 @@
/* $NetBSD: tape.c,v 1.28 1997/09/15 08:04:40 lukem Exp $ */
/* $NetBSD: tape.c,v 1.29 1997/09/16 13:44:16 lukem Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,9 +41,9 @@
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)tape.c 8.6 (Berkeley) 9/13/94";
static char sccsid[] = "@(#)tape.c 8.9 (Berkeley) 5/1/95";
#else
__RCSID("$NetBSD: tape.c,v 1.28 1997/09/15 08:04:40 lukem Exp $");
__RCSID("$NetBSD: tape.c,v 1.29 1997/09/16 13:44:16 lukem Exp $");
#endif
#endif /* not lint */
@ -659,7 +659,7 @@ getfile(fill, skip)
{
int i;
int curblk = 0;
long size = spcl.c_dinode.di_size;
quad_t size = spcl.c_dinode.di_size;
static char clearedbuf[MAXBSIZE];
char buf[MAXBSIZE / TP_BSIZE][TP_BSIZE];
char junk[TP_BSIZE];
@ -681,20 +681,19 @@ loop:
if (spcl.c_addr[i]) {
readtape(&buf[curblk++][0]);
if (curblk == fssize / TP_BSIZE) {
(*fill)((char *)buf, size > TP_BSIZE ?
(long) (fssize) :
(curblk - 1) * TP_BSIZE + size);
(*fill)((char *)buf, (long)(size > TP_BSIZE ?
fssize : (curblk - 1) * TP_BSIZE + size));
curblk = 0;
}
} else {
if (curblk > 0) {
(*fill)((char *)buf, size > TP_BSIZE ?
(long) (curblk * TP_BSIZE) :
(curblk - 1) * TP_BSIZE + size);
(*fill)((char *)buf, (long)(size > TP_BSIZE ?
curblk * TP_BSIZE :
(curblk - 1) * TP_BSIZE + size));
curblk = 0;
}
(*skip)(clearedbuf, size > TP_BSIZE ?
(long) TP_BSIZE : size);
(*skip)(clearedbuf, (long)(size > TP_BSIZE ?
TP_BSIZE : size));
}
if ((size -= TP_BSIZE) <= 0) {
for (i++; i < spcl.c_count; i++)
@ -711,7 +710,7 @@ loop:
curfile.name, blksread);
}
if (curblk > 0)
(*fill)((char *)buf, (curblk * TP_BSIZE) + size);
(*fill)((char *)buf, (long)((curblk * TP_BSIZE) + size));
findinode(&spcl);
gettingfile = 0;
}
@ -795,7 +794,7 @@ xtrmap(buf, size)
long size;
{
memcpy(map, buf, size);
memmove(map, buf, size);
map += size;
}
@ -838,7 +837,7 @@ readtape(buf)
int cnt, seek_failed;
if (blkcnt < numtrec) {
memcpy(buf, &tapebuf[(blkcnt++ * TP_BSIZE)], (long)TP_BSIZE);
memmove(buf, &tapebuf[(blkcnt++ * TP_BSIZE)], (long)TP_BSIZE);
blksread++;
tpblksread++;
return;
@ -941,10 +940,10 @@ getmore:
panic("partial block read: %d should be %d\n",
rd, ntrec * TP_BSIZE);
terminateinput();
memcpy(&tapebuf[rd], &endoftapemark, (long)TP_BSIZE);
memmove(&tapebuf[rd], &endoftapemark, (long)TP_BSIZE);
}
blkcnt = 0;
memcpy(buf, &tapebuf[(blkcnt++ * TP_BSIZE)], (long)TP_BSIZE);
memmove(buf, &tapebuf[(blkcnt++ * TP_BSIZE)], (long)TP_BSIZE);
blksread++;
tpblksread++;
}
@ -1072,7 +1071,7 @@ gethead(buf)
buf->c_dinode.di_mtime = u_ospcl.s_ospcl.c_dinode.odi_mtime;
buf->c_dinode.di_ctime = u_ospcl.s_ospcl.c_dinode.odi_ctime;
buf->c_count = u_ospcl.s_ospcl.c_count;
memcpy(buf->c_addr, u_ospcl.s_ospcl.c_addr, (long)256);
memmove(buf->c_addr, u_ospcl.s_ospcl.c_addr, (long)256);
if (u_ospcl.s_ospcl.c_magic != OFS_MAGIC ||
checksum((int *)(&u_ospcl.s_ospcl)) == FAIL)
return(FAIL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: utilities.c,v 1.12 1997/09/15 08:04:41 lukem Exp $ */
/* $NetBSD: utilities.c,v 1.13 1997/09/16 13:44:17 lukem Exp $ */
/*
* Copyright (c) 1983, 1993
@ -36,9 +36,9 @@
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)utilities.c 8.4 (Berkeley) 10/18/94";
static char sccsid[] = "@(#)utilities.c 8.5 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: utilities.c,v 1.12 1997/09/15 08:04:41 lukem Exp $");
__RCSID("$NetBSD: utilities.c,v 1.13 1997/09/16 13:44:17 lukem Exp $");
#endif
#endif /* not lint */