/*
- * $Id: directory.c,v 1.73 2003-05-12 09:43:11 didg Exp $
+ * $Id: directory.c,v 1.74 2003-05-20 14:46:50 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
ashort = 0;
/* this needs to handle current directory access rights */
if (st->st_ctime == dir->ctime) {
- ashort = dir->offcnt;
+ ashort = (dir->offcnt > 0xffff)?0xffff:dir->offcnt;
}
else if ((ret = for_each_dirent(vol, upath, NULL,NULL)) >= 0) {
- ashort = ret;
- dir->offcnt = ashort;
+ dir->offcnt = ret;
dir->ctime = st->st_ctime;
+ ashort = (dir->offcnt > 0xffff)?0xffff:dir->offcnt;
}
ashort = htons( ashort );
memcpy( data, &ashort, sizeof( ashort ));
/*
- * $Id: directory.h,v 1.14 2003-05-02 18:22:13 didg Exp $
+ * $Id: directory.h,v 1.15 2003-05-20 14:46:50 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
int d_flags;
time_t ctime; /* inode ctime */
- int offcnt; /* offspring count */
+ u_int32_t offcnt; /* offspring count */
char *d_m_name; /* mac name */
char *d_u_name; /* unix name */
/*
- * $Id: enumerate.c,v 1.40 2003-05-16 14:38:20 didg Exp $
+ * $Id: enumerate.c,v 1.41 2003-05-20 14:46:50 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
}
data += esz;
actcnt++;
+ /* FIXME if we rollover 16 bits and it's not FPEnumerateExt2 */
}
if ( actcnt == 0 ) {