/* --------------------- */
void setdiroffcnt(struct dir *dir, struct stat *st, u_int32_t count)
{
- dir->offcnt = count;
+ dir->d_offcnt = count;
dir->d_ctime = st->st_ctime;
dir->d_flags &= ~DIRF_CNID;
}
ashort = 0;
/* this needs to handle current directory access rights */
if (diroffcnt(dir, st)) {
- ashort = (dir->offcnt > 0xffff)?0xffff:dir->offcnt;
+ ashort = (dir->d_offcnt > 0xffff)?0xffff:dir->d_offcnt;
}
else if ((ret = for_each_dirent(vol, upath, NULL,NULL)) >= 0) {
setdiroffcnt(dir, st, ret);
- ashort = (dir->offcnt > 0xffff)?0xffff:dir->offcnt;
+ ashort = (dir->d_offcnt > 0xffff)?0xffff:dir->d_offcnt;
}
ashort = htons( ashort );
memcpy( data, &ashort, sizeof( ashort ));
return AFPERR_MISC;
}
- curdir->offcnt++;
+ curdir->d_offcnt++;
if ((dir = dir_add(vol, curdir, s_path, strlen(s_path->u_name))) == NULL) {
return AFPERR_MISC;
*/
*sd.sd_last = 0;
sd.sd_last += len + 1;
- curdir->offcnt--; /* a little lie */
+ curdir->d_offcnt--; /* a little lie */
continue;
}
ad_close( adp, ADFLAGS_DF|ADFLAGS_HF );
createfile_done:
- curdir->offcnt++;
+ curdir->d_offcnt++;
#ifdef DROPKLUDGE
if (vol->v_flags & AFPVOL_DROPBOX) {
retvalue = err;
goto copy_exit;
}
- curdir->offcnt++;
+ curdir->d_offcnt++;
#ifdef DROPKLUDGE
if (vol->v_flags & AFPVOL_DROPBOX) {
if (dirreenumerate(dir, &st)) {
/* we already did it once and the dir haven't been modified */
- return dir->offcnt;
+ return dir->d_offcnt;
}
data.vol = vol;
}
}
if ( rc == AFP_OK ) {
- curdir->offcnt--;
+ curdir->d_offcnt--;
setvoltime(obj, vol );
}
rc = AFPERR_PARAM;
goto exit;
}
- curdir->offcnt++;
- sdir->offcnt--;
+ curdir->d_offcnt++;
+ sdir->d_offcnt--;
#ifdef DROPKLUDGE
if (vol->v_flags & AFPVOL_DROPBOX) {
/* FIXME did is not always the source id */
ucs2_t *d_m_name_ucs2; /* mac name as UCS2 */
qnode_t *qidx_node; /* pointer to position in queue index */
time_t d_ctime; /* inode ctime, used and modified by reenumeration */
- time_t ctime_dircache; /* inode ctime, used and modified by dircache */
+
int d_flags; /* directory flags */
cnid_t d_pdid; /* CNID of parent directory */
cnid_t d_did; /* CNID of directory */
- uint32_t offcnt; /* offspring count */
+ uint32_t d_offcnt; /* offspring count */
uint16_t d_vid; /* only needed in the dircache, because
we put all directories in one cache. */
+ /* Stuff used in the dircache */
+ time_t ctime_dircache; /* inode ctime, used and modified by dircache */
};
struct path {