SCCS-vsn: sbin/restore/dirs.c 5.27
SCCS-vsn: sbin/restore/extern.h 5.4
SCCS-vsn: sbin/restore/interactive.c 5.20
SCCS-vsn: sbin/restore/main.c 5.12
SCCS-vsn: sbin/restore/symtab.c 5.8
SCCS-vsn: sbin/restore/tape.c 5.36
-static char sccsid[] = "@(#)dirs.c 5.26 (Berkeley) %G%";
+static char sccsid[] = "@(#)dirs.c 5.27 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
vprintf(stdout, "Extract directories from tape\n");
(void) sprintf(dirfile, "%s/rstdir%d", _PATH_TMP, dumpdate);
df = fopen(dirfile, "w");
vprintf(stdout, "Extract directories from tape\n");
(void) sprintf(dirfile, "%s/rstdir%d", _PATH_TMP, dumpdate);
df = fopen(dirfile, "w");
fprintf(stderr,
"restore: %s - cannot create directory temporary\n",
dirfile);
fprintf(stderr,
"restore: %s - cannot create directory temporary\n",
dirfile);
if (genmode != 0) {
(void) sprintf(modefile, "%s/rstmode%d", _PATH_TMP, dumpdate);
mf = fopen(modefile, "w");
if (genmode != 0) {
(void) sprintf(modefile, "%s/rstmode%d", _PATH_TMP, dumpdate);
mf = fopen(modefile, "w");
fprintf(stderr,
"restore: %s - cannot create modefile \n",
modefile);
fprintf(stderr,
"restore: %s - cannot create modefile \n",
modefile);
ino = ROOTINO;
while (*path == '/')
path++;
ino = ROOTINO;
while (*path == '/')
path++;
while ((name = strsep(&path, "/")) != NULL && *name != NULL) {
while ((name = strsep(&path, "/")) != NULL && *name != NULL) {
- if ((dp = searchdir(ino, name)) == 0)
+ if ((dp = searchdir(ino, name)) == NULL)
return (NULL);
ino = dp->d_ino;
}
return (NULL);
ino = dp->d_ino;
}
itp = inotablookup(inum);
if (itp == NULL)
itp = inotablookup(inum);
if (itp == NULL)
rst_seekdir(dirp, itp->t_seekpt, itp->t_seekpt);
len = strlen(name);
do {
rst_seekdir(dirp, itp->t_seekpt, itp->t_seekpt);
len = strlen(name);
do {
rst_seekdir(dirp, itp->t_seekpt, itp->t_seekpt);
return (dirp);
}
rst_seekdir(dirp, itp->t_seekpt, itp->t_seekpt);
return (dirp);
}
itp->t_ino = ino;
itp->t_seekpt = seekpt;
if (mf == NULL)
itp->t_ino = ino;
itp->t_seekpt = seekpt;
if (mf == NULL)
node.ino = ino;
node.timep[0].tv_sec = dip->di_atime.ts_sec;
node.timep[0].tv_usec = dip->di_atime.ts_nsec / 1000;
node.ino = ino;
node.timep[0].tv_sec = dip->di_atime.ts_sec;
node.timep[0].tv_usec = dip->di_atime.ts_nsec / 1000;
node.uid = dip->di_uid;
node.gid = dip->di_gid;
(void) fwrite((char *)&node, 1, sizeof(struct modeinfo), mf);
node.uid = dip->di_uid;
node.gid = dip->di_gid;
(void) fwrite((char *)&node, 1, sizeof(struct modeinfo), mf);
for (itp = inotab[INOHASH(ino)]; itp != NULL; itp = itp->t_next)
if (itp->t_ino == ino)
for (itp = inotab[INOHASH(ino)]; itp != NULL; itp = itp->t_next)
if (itp->t_ino == ino)
return (NULL);
}
/*
* Clean up and exit
*/
return (NULL);
}
/*
* Clean up and exit
*/
done(exitcode)
int exitcode;
{
done(exitcode)
int exitcode;
{
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)extern.h 5.3 (Berkeley) %G%
+ * @(#)extern.h 5.4 (Berkeley) %G%
*/
struct entry *addentry __P((char *, ino_t, int));
*/
struct entry *addentry __P((char *, ino_t, int));
long deletefile __P((char *, ino_t, int));
void deleteino __P((ino_t));
ino_t dirlookup __P((const char *));
long deletefile __P((char *, ino_t, int));
void deleteino __P((ino_t));
ino_t dirlookup __P((const char *));
+__dead void done __P((int));
void dumpsymtable __P((char *, long));
void err __P((const char *, ...));
void extractdirs __P((int));
void dumpsymtable __P((char *, long));
void err __P((const char *, ...));
void extractdirs __P((int));
void getvol __P((long));
void initsymtable __P((char *));
int inodetype __P((ino_t));
void getvol __P((long));
void initsymtable __P((char *));
int inodetype __P((ino_t));
-struct inotab *inotablookup __P((ino_t));
int linkit __P((char *, char *, int));
struct entry *lookupino __P((ino_t));
struct entry *lookupname __P((char *));
int linkit __P((char *, char *, int));
struct entry *lookupino __P((ino_t));
struct entry *lookupname __P((char *));
void newtapebuf __P((long));
long nodeupdates __P((char *, ino_t, int));
void onintr __P((int));
void newtapebuf __P((long));
long nodeupdates __P((char *, ino_t, int));
void onintr __P((int));
-RST_DIR *opendirfile __P((const char *));
void panic __P((const char *, ...));
void pathcheck __P((char *));
struct direct *pathsearch __P((const char *));
void panic __P((const char *, ...));
void pathcheck __P((char *));
struct direct *pathsearch __P((const char *));
ino_t upperbnd __P((ino_t));
long verifyfile __P((char *, ino_t, int));
void xtrnull __P((char *, long));
ino_t upperbnd __P((ino_t));
long verifyfile __P((char *, ino_t, int));
void xtrnull __P((char *, long));
+
+/* From ../dump/dumprmt.c */
+void rmtclose __P((void));
+int rmthost __P((char *));
+int rmtioctl __P((int, int));
+int rmtopen __P((char *, int));
+int rmtread __P((char *, int));
+int rmtseek __P((int, int));
-static char sccsid[] = "@(#)interactive.c 5.19 (Berkeley) %G%";
+static char sccsid[] = "@(#)interactive.c 5.20 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
static char *copynext __P((char *, char *));
static int fcmp __P((const void *, const void *));
static char *copynext __P((char *, char *));
static int fcmp __P((const void *, const void *));
-static char *fmtentry __P((struct afile *));
static void formatf __P((struct afile *, int));
static void getcmd __P((char *, char *, char *, struct arglist *));
struct dirent *glob_readdir __P((RST_DIR *dirp));
static void formatf __P((struct afile *, int));
static void getcmd __P((char *, char *, char *, struct arglist *));
struct dirent *glob_readdir __P((RST_DIR *dirp));
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 5.12 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
time_t dumpdate;
FILE *terminal;
time_t dumpdate;
FILE *terminal;
-static void err __P((const char *, ...));
static void obsolete __P((int *, char **[]));
static void usage __P((void));
static void obsolete __P((int *, char **[]));
static void usage __P((void));
#include <varargs.h>
#endif
#include <varargs.h>
#endif
#if __STDC__
err(const char *fmt, ...)
#else
#if __STDC__
err(const char *fmt, ...)
#else
-static char sccsid[] = "@(#)symtab.c 5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)symtab.c 5.8 (Berkeley) %G%";
char *tailindex;
tailindex = rindex(name, '/');
char *tailindex;
tailindex = rindex(name, '/');
return (NULL);
*tailindex = '\0';
ep = lookupname(name);
return (NULL);
*tailindex = '\0';
ep = lookupname(name);
-static char sccsid[] = "@(#)tape.c 5.35 (Berkeley) %G%";
+static char sccsid[] = "@(#)tape.c 5.36 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
vprintf(stdout, "Verify tape and initialize maps\n");
#ifdef RRESTORE
if (host)
vprintf(stdout, "Verify tape and initialize maps\n");
#ifdef RRESTORE
if (host)
- mt = rmtopen(magtape, O_RDONLY, 0);
+ mt = rmtopen(magtape, 0);