[haiku-commits] Re: r35149 - haiku/trunk/src/add-ons/kernel/file_systems/userlandfs/server/beos

  • From: "Michael Lotz" <mmlr@xxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 19 Jan 2010 13:27:34 +0000

> 
> On 2010-01-19 at 00:57:38 [+0100], mmlr@xxxxxxxx wrote:
> > Author: mmlr
> > Date: 2010-01-19 00:57:38 +0100 (Tue, 19 Jan 2010) New Revision: 
> > 35149
> > Changeset: http://dev.haiku-os.org/changeset/35149/haiku
> > 
> > Modified:
> >    haiku/trunk/src/add-
> > ons/kernel/file_systems/userlandfs/server/beos/BeOS
> >    KernelVolume.cpp
> > Log:
> > The node parameter is a void ** but these calls expect the void * 
> > to the 
> > node we got as a result from read_vnode. The joys of void pointers.
> > 
> > 
> > Modified: 
> > haiku/trunk/src/add-
> > ons/kernel/file_systems/userlandfs/server/beos/BeOSKer
> > nelVolume.cpp 
> > ===================================================================
> > --- 
> > haiku/trunk/src/add-
> > ons/kernel/file_systems/userlandfs/server/beos/BeOSKer
> > nelVolume.cpp    2010-01-18 23:14:46 UTC (rev 35148)
> > +++ 
> > haiku/trunk/src/add-
> > ons/kernel/file_systems/userlandfs/server/beos/BeOSKer
> > nelVolume.cpp    2010-01-18 23:57:38 UTC (rev 35149)
> > @@ -190,9 +190,9 @@
> >  
> >      // stat it -- we need to get the node type
> >      struct stat st;
> > -    error = ReadStat(node, &st);
> > +    error = ReadStat(*node, &st);
> >      if (error != B_OK) {
> > -        WriteVNode(node, reenter);
> > +        WriteVNode(*node, reenter);
> >          return error;
> >      }
> 
> Ah, that would be why netfs crashed for me in stat stuff. I didn't 
> even 
> investigate and just assumed it would be because of stat versus 
> beos_stat... Thanks!

My initial though exactly. But after changing stuff to stat_beos back 
and forth didn't make any difference and (lots of) debug output reading 
I found it suspecious that it got a stack allocated pointer where the 
node was expected. From there it was pretty obvious. As always the 
necessary info was right there in the initial debug output, you just 
had to make sense of it...

Regards
Michael

Other related posts: