after making a name into a tempname, treat file as NEW instead of EXTRACT
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Sun, 15 May 1983 07:47:43 +0000 (23:47 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Sun, 15 May 1983 07:47:43 +0000 (23:47 -0800)
SCCS-vsn: sbin/restore/restore.c 3.14

usr/src/sbin/restore/restore.c

index 0033cbb..22f1cef 100644 (file)
@@ -1,7 +1,7 @@
 /* Copyright (c) 1983 Regents of the University of California */
 
 #ifndef lint
 /* Copyright (c) 1983 Regents of the University of California */
 
 #ifndef lint
-static char sccsid[] = "@(#)restore.c  3.13    (Berkeley)      83/05/03";
+static char sccsid[] = "@(#)restore.c  3.14    (Berkeley)      83/05/14";
 #endif
 
 #include "restore.h"
 #endif
 
 #include "restore.h"
@@ -225,6 +225,21 @@ nodeupdates(name, ino, type)
                        flagvalues(ip));
                break;
 
                        flagvalues(ip));
                break;
 
+       /*
+        * A file on the tape has a name which is the same as a name
+        * corresponding to a different file in the previous dump.
+        * Since all files to be deleted have already been removed,
+        * this file must live under a new name in this dump level.
+        * For the time being it is given a temporary name in anticipation
+        * that it will be renamed when it is later found by inode number
+        * (see INOFND case below). The entry is then treated as a new
+        * file.
+        */
+       case ONTAPE|NAMEFND:
+       case ONTAPE|NAMEFND|MODECHG:
+               mktempname(np);
+               /* fall through */
+
        /*
         * A previously non-existent file.
         * Add it to the file system, and request its extraction.
        /*
         * A previously non-existent file.
         * Add it to the file system, and request its extraction.
@@ -278,23 +293,8 @@ nodeupdates(name, ino, type)
                break;
 
        /*
                break;
 
        /*
-        * A file on the tape has a name which is the same as a name
-        * corresponding to a different file in the previous dump.
-        * Since all files to be deleted have already been removed,
-        * this file must live under a new name in this dump level.
-        * For the time being it is given a temporary name in anticipation
-        * that it will be renamed when it is later found by inode number
-        * (see INOFND case above).
-        * This then falls into the simple case of a previously known
-        * file which is to be updated.
+        * A previously known file which is to be updated.
         */
         */
-       case ONTAPE|NAMEFND:
-       case ONTAPE|NAMEFND|MODECHG:
-               mktempname(np);
-               np = addentry(name, ino, type);
-               if (type == NODE)
-                       newnode(np);
-               /* fall through */
        case ONTAPE|INOFND|NAMEFND:
                if (type == LEAF)
                        np->e_flags |= EXTRACT;
        case ONTAPE|INOFND|NAMEFND:
                if (type == LEAF)
                        np->e_flags |= EXTRACT;