ret = fcache_get_data (centry, ce); if (ret) { fcache_release (centry); return ret; }  if (centry->status.FileType != TYPE_DIR) { fcache_release (centry); return ENOTDIR; }  fd = fcache_open_file (centry, O_RDONLY); if (fd < 0) { fcache_release(centry); return errno; }  if (fstat (fd, &sb)) { fcache_release(centry); close_ret = close (fd); assert (close_ret == 0); return errno; }  len = sb.st_size;  ret = fbuf_create (&the_fbuf, fd, len, FBUF_READ); if (ret) { fcache_release(centry); return ret; } page0 = (DirPage0 *)(the_fbuf.buf); npages = ntohs(page0->header.pg_pgcount);  ret = (npages == 1) && (page0->dheader.map[0] == 2);
ret = fdir_emptyp (&the_fbuf);
adir_emptyp (VenusFid dir,	     CredCacheEntry *ce){     int fd;     DirPage0 *page0;     FCacheEntry *centry;     unsigned len;     int ret;     int close_ret;     fbuf the_fbuf;     struct stat sb;     unsigned npages;     ret = fcache_get (&centry, dir, ce);     if (ret)	 return ret;     ret = fcache_get_data (centry, ce);     if (ret) {	 fcache_release (centry);	 return ret;     }     if (centry->status.FileType != TYPE_DIR) {	 fcache_release (centry);	 return ENOTDIR;     }     fd = fcache_open_file (centry, O_RDONLY);     if (fd < 0) {	 fcache_release(centry);	 return errno;     }     if (fstat (fd, &sb)) {	 fcache_release(centry);	 close_ret = close (fd);	 assert (close_ret == 0);	 return errno;     }     len = sb.st_size;     ret = fbuf_create (&the_fbuf, fd, len, FBUF_READ);     if (ret) {	 fcache_release(centry);	 return ret;     }     page0 = (DirPage0 *)(the_fbuf.buf);     npages = ntohs(page0->header.pg_pgcount);     ret = (npages == 1) && (page0->dheader.map[0] == 2);     fbuf_end (&the_fbuf);     fcache_release (centry);     return ret;}