a directory not in the dump.
From: "Chris G. Demetriou" <cgd@sun-lamp.cs.berkeley.edu>
SCCS-vsn: sbin/restore/utilities.c 8.2
-static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)utilities.c 8.2 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
*cp = '\0';
ep = lookupname(name);
if (ep == NULL) {
*cp = '\0';
ep = lookupname(name);
if (ep == NULL) {
+ /* Safe; we know the pathname exists in the dump. */
ep = addentry(name, pathsearch(name)->d_ino, NODE);
newnode(ep);
}
ep = addentry(name, pathsearch(name)->d_ino, NODE);
newnode(ep);
}
dirlookup(name)
const char *name;
{
dirlookup(name)
const char *name;
{
+
+ ino = ((dp = pathsearch(name)) == NULL) ? 0 : dp->d_ino;
- ino = pathsearch(name)->d_ino;
if (ino == 0 || TSTINO(ino, dumpmap) == 0)
if (ino == 0 || TSTINO(ino, dumpmap) == 0)
- fprintf(stderr, "%s is not on tape\n", name);
+ fprintf(stderr, "%s is not on the tape\n", name);