Date: Tue, 27 Apr 2004 07:24:51 -0700 (PDT) From: Chris Vance <cvance@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 51794 for review Message-ID: <200404271424.i3REOpvL061388@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=51794 Change 51794 by cvance@cvance_g5 on 2004/04/27 07:24:04 Correct extattr autostart code - fix the computation for when to stop reading dir entries. Affected files ... .. //depot/projects/trustedbsd/sedarwin73/apsl/xnu/bsd/hfs/hfs_extattr.c#3 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin73/apsl/xnu/bsd/hfs/hfs_extattr.c#3 (text+ko) ==== @@ -438,7 +438,7 @@ struct uio auio; struct iovec aiov; char *dirbuf; - int error, eofflag = 0; + int error, eofflag = 0, readcnt; if (dvp->v_type != VDIR) return (ENOTDIR); @@ -469,7 +469,8 @@ return (error); } - edp = (struct dirent *)&dirbuf[DIRBLKSIZ]; + readcnt = DIRBLKSIZ - auio.uio_resid; + edp = (struct dirent *)&dirbuf[readcnt]; for (dp = (struct dirent *)dirbuf; dp < edp; ) { #if (BYTE_ORDER == LITTLE_ENDIAN) dp->d_type = dp->d_namlen;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404271424.i3REOpvL061388>