*BSD News Article 29166


Return to BSD News archive

Xref: sserve comp.unix.internals:7027 comp.unix.bsd:13705
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!wupost!courier.urbana.mcd.mot.com!usenet
From: smadhur@charm.urbana.mcd.mot.com (Nivas Madhur)
Newsgroups: comp.unix.internals,comp.unix.bsd
Subject: UFS directory entry - when is d_reclen == 0?
Date: 4 Apr 1994 21:17:58 GMT
Organization: Motorola Computer Group, Urbana Design Center
Lines: 22
Distribution: world
Message-ID: <2nq066$h2f@courier.urbana.mcd.mot.com>
Reply-To: smadhur@urbana.mcd.mot.com
NNTP-Posting-Host: courier.urbana.mcd.mot.com

eywords: UFS, directory
Xref: courier.urbana.mcd.mot.com comp.unix.internals:6858 comp.unix.bsd:14721

Hello all,

In a lot of places in UFS code, I see code like 

	if (...d_reclen == 0 || ...)
		skip DIRBLKSZ bytes

implying that d_reclen == 0 indicates an invalid directory entry.
I checked fsck code and in the case of invalid entry, d_ino and
d_namlen are being set to 0 but no where could I find d_reclen
being set to 0. Can someone tell me where/when d_reclen will be
set to 0?

Thanks in advance,

Nivas
......................................................................
Nivas Madhur smadhur@urbana.mcd.mot.com Motorola Computer Group
1101 E. University Av Urbana IL 61801 Ma bell (217) 384 8588