svn commit: samba r19017 - in branches/SAMBA_4_0/source/lib/replace: .

tridge at tridge at
Sun Oct 1 21:34:26 GMT 2006


 > Attempt to fix the BSD RAW-CHKPATH failures: In Samba3 we rely on opendir
 > returning ENOTDIR when the file opened is not a directory. Can we merge this
 > back into Samba4?

yes, please merge.

We should also see if we can get rid of repdir_getdents()
completely. I suspect all hosts that have getdents() and need the
directory functions replaced also have getdirentries(). If we can't
get rid of it then we could use one C file and a couple of #ifdef.

I used two C files as I really expected repdir_getdirentries() to not
work at all. It surprised me a lot when it worked! I was expecting to
svn delete it when the build farm showed it not working (Metze was the
one who suggested it might work).

 > +	if (fstat(d->fd, &sb) < 0) {
 > +		close(d->fd);
 > +		free(d);
 > +		return NULL;
 > +	}

very minor point with this. The correct test for the failure of most
system calls in the C library API is "== -1" not "< 0". It doesn't
matter for this call, but for some calls it does matter, so its a good
habit to get into. Testing for "!= 0" is also OK, and is even arguably
better for this case.

Cheers, Tridge

More information about the samba-technical mailing list