Subject: Re: More on [r]dump
To: Chris Torek <torek@horse.ee.lbl.gov>
From: Havard Eidnes <Havard.Eidnes@runit.sintef.no>
List: netbsd-bugs
Date: 11/17/1993 19:21:04
------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"

> [me]
> >> This code is tricky and nasty; beware!
> 
> >I now have ...
> >Are you telling me that this is a correct combination?
> 
> I believe so, but study the code closely:

No time for that, sorry.  :-)

> >Furthermore, I guess (!) that the other loops going through to maxino
> >should be changed as well to start at 1 instead of 0
> 
> No!  Some of them increment `ino' partway in the loop; some depend on
> ino being initially zero (they pick up a map value if ino%8==0).  As
> I said, it is tricky....

Uh-oh...  Ok, I have backed down to my original modification, which is
attached.  (If you don't have the NetBSD-current sources, this will be to
little info for you to say "ok", I guess...)


- Havard

------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-Description: dump diff

*** dumptraverse.c.old	Sun Nov  7 09:40:58 1993
--- dumptraverse.c	Wed Nov 17 19:15:38 1993
***************
*** 108,112 ****
  	int anydirskipped = 0;
  
! 	for (ino = 0; ino <= maxino; ino++) {
  		dp = getino(ino);
  		if ((mode = (dp->di_mode & IFMT)) == 0)
--- 108,112 ----
  	int anydirskipped = 0;
  
! 	for (ino = 1; ino <= maxino; ino++) {
  		dp = getino(ino);
  		if ((mode = (dp->di_mode & IFMT)) == 0)

------- =_aaaaaaaaaa0--

------------------------------------------------------------------------------