help with dir. structure sysV vs. 4.2BSD

Peter da Silva peter at baylor.UUCP
Tue Aug 20 01:12:26 AEST 1985


> It uses a low level read (shown below; it is in
> mindist() ) to look at the directory. I believe this 
> is the line which gives me trouble.
> 
>        while (read(fd,(char *) &nbuf, sizeof(struct direct)) > 0)
> 
> I think I should be using DIRSIZ(dp), instead of sizeof... but
> this is where I get in over my head. Has anyone out there 
> ported this to 4.2? I have the rest of the sources, but I
> didn't want to post K&P's program without their permission.

You want to replace the code with the library routines to read
directories. Look it up in section 3 of the manual.
-- 
	Peter (Made in Australia) da Silva
		UUCP: ...!shell!neuro1!{hyd-ptd,baylor,datafac}!peter
		MCI: PDASILVA; CIS: 70216,1076



More information about the Comp.unix.wizards mailing list