int
EnumerateDir(void *dir, int (*hookproc) (void *dir, char *name,
- afs_int32 vnode, afs_int32 unique),
+ afs_int32 vnode, afs_int32 unique),
void *hook)
{
/* Enumerate the contents of a directory.
static struct DirEntry *
FindFid (void *dir, afs_uint32 vnode, afs_uint32 unique)
{
- /* Find a directory entry, given the vnode and uniquifier of a object.
+ /* Find a directory entry, given the vnode and uniquifier of a object.
* This entry returns a pointer to a locked buffer. If no entry is found,
- * however, no items are left locked, and a null pointer is returned
- * instead.
+ * however, no items are left locked, and a null pointer is returned
+ * instead.
*/
int i;
struct DirHeader *dhp;
return 0;
}
while(tp) {
- if (vnode == ntohl(tp->fid.vnode)
- && unique == ntohl(tp->fid.vunique)) {
+ if (vnode == ntohl(tp->fid.vnode)
+ && unique == ntohl(tp->fid.vunique)) {
DRelease(dhp, 0);
return tp;
}
}
int
-InverseLookup (void *dir, afs_uint32 vnode, afs_uint32 unique, char *name,
+InverseLookup (void *dir, afs_uint32 vnode, afs_uint32 unique, char *name,
afs_uint32 length)
{
/* Look for the name pointing to given vnode and unique in a directory */
struct DirEntry *entry;
int code = 0;
-
+
entry = FindFid(dir, vnode, unique);
if (!entry)
return ENOENT;