fd = fcache_open_file (dir, O_RDWR | O_CREAT | O_TRUNC, 0666);
fd = fcache_open_file (dir, O_RDWR);
adir_mkdir (FCacheEntry *dir,	    AFSFid dot,	    AFSFid dot_dot){    fbuf the_fbuf;    int ret;    int fd;    DirPage0 *page0;    DirPage1 *page;    int ind;    int i;    int tmp;    assert (CheckLock(&dir->lock) == -1);    fd = fcache_open_file (dir, O_RDWR | O_CREAT | O_TRUNC, 0666);    if (fd < 0)	return errno;    ret = fbuf_create (&the_fbuf, fd, 0, FBUF_WRITE);    if (ret)	return ret;    ret = create_new_page (&page, &the_fbuf);    if (ret)	goto out;    page0 = (DirPage0 *)(the_fbuf.buf);    memset (&page0->dheader, 0, sizeof(page0->dheader));    tmp = ENTRIESPERPAGE	- (sizeof(PageHeader) + sizeof(DirHeader)) / sizeof(DirEntry);    page0->header.pg_freecount = tmp;    page0->dheader.map[0]      = tmp;    page0->header.pg_pgcount   = htons(1);    for (i = 0; i < 13; ++i)	set_used (page, i);    assert (page0->dheader.hash[hashentry(".")] == 0);    ind = add_to_page (page0, page, 0, ".", dot, 0);    assert (ind >= 0);    page0->dheader.hash[hashentry(".")] = htons(ind + 1);    assert (page0->dheader.hash[hashentry("..")] == 0);    ind = add_to_page (page0, page, 0, "..", dot_dot, 0);    assert (ind >= 0);    page0->dheader.hash[hashentry("..")] = htons(ind + 1);out:    assert (dir->status.Length == the_fbuf.len);    fbuf_end (&the_fbuf);    return ret;}