PERFORCE change 51794 for review
Chris Vance
cvance at FreeBSD.org
Tue Apr 27 14:24:51 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=51794
Change 51794 by cvance at 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;
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list