home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!ucbvax!VANGOGH.CS.BERKELEY.EDU!bostic
- From: bostic@VANGOGH.CS.BERKELEY.EDU (Keith Bostic)
- Newsgroups: comp.bugs.4bsd.ucb-fixes
- Subject: V1.100 (Bug in NET2 dump and newly released dump)
- Message-ID: <199301260206.AA13088@vangogh.CS.Berkeley.EDU>
- Date: 26 Jan 93 02:06:25 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: University of California at Berkeley
- Lines: 74
- Approved: ucb-fixes@okeeffe.berkeley.edu
-
- Subject: Bug in NET2 dump and newly released dump.
- Index: sbin/{dump,restore} 4.4BSD-alpha
-
- Description:
-
- dumptraverse.c:mapfiles() contains a loop that begins with:
-
- for (ino = 0; ino < maxino; ino++) {
- dp = getino(ino);
-
- This contrasts with the loop in main() containing:
-
- for (map = dumpdirmap, ino = 0; ino < maxino; ) {
- dirty = GETDIRTY(ino) /* Shortened for brevity. */
- ino++;
- if ((dirty & 1) == 0)
- continue;
- dp = getino(ino); /* Work with dp. */
- }
-
- and the subsequent loop using dumpinomap.
-
- While the loops in main() appear to be correct, the loop in
- mapfiles() can never invoke:
-
- SETINO(maxino, usedinomap)
- or
- SETINO(maxino, dumpinomap);
-
- Changing the < to <= in mapfiles() (BUT NOT IN MAIN!!) fixes it.
-
- Fix:
- Copies of the new dump/restore package are available by anonymous
- ftp from ftp.cs.berkeley.edu:ucb/4bsd/dump.restore.tar.Z.
-
- The following patch also fixes the problem.
-
- *** traverse.c.old Mon Jan 25 12:50:10 1993
- --- traverse.c.new Mon Jan 25 12:49:52 1993
- ***************
- *** 32,38 ****
- */
-
- #ifndef lint
- ! static char sccsid[] = "@(#)traverse.c 5.21 (Berkeley) 7/19/92";
- #endif /* not lint */
-
- #ifdef sunos
- --- 32,38 ----
- */
-
- #ifndef lint
- ! static char sccsid[] = "@(#)traverse.c 5.22 (Berkeley) 1/25/93";
- #endif /* not lint */
-
- #ifdef sunos
- ***************
- *** 115,121 ****
- register struct dinode *dp;
- int anydirskipped = 0;
-
- ! for (ino = 0; ino < maxino; ino++) {
- dp = getino(ino);
- if ((mode = (dp->di_mode & IFMT)) == 0)
- continue;
- --- 115,121 ----
- register struct dinode *dp;
- int anydirskipped = 0;
-
- ! for (ino = 0; ino <= maxino; ino++) {
- dp = getino(ino);
- if ((mode = (dp->di_mode & IFMT)) == 0)
- continue;
-
-