• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/hfs/

Lines Matching refs:cnid

106 static int getkey(struct hfsmount *hfsmp, cnid_t cnid, CatalogKey * key);
113 static void buildrecord(struct cat_attr *attrp, cnid_t cnid, int std_hfs, u_int32_t encoding, CatalogRecord *crp, u_int32_t *recordSize);
117 static int builddesc(const HFSPlusCatalogKey *key, cnid_t cnid, u_long hint, u_long encoding,
404 * cat_findname - obtain a descriptor from cnid
414 cat_findname(struct hfsmount *hfsmp, cnid_t cnid, struct cat_desc *outdescp)
428 buildthreadkey(cnid, std_hfs, (CatalogKey *)&iterator->key);
466 builddesc(pluskey, cnid, 0, encoding, isdir, outdescp);
470 builddesc((HFSPlusCatalogKey *)keyp, cnid, 0, 0, isdir, outdescp);
487 cat_idlookup(struct hfsmount *hfsmp, cnid_t cnid, int allow_system_files,
502 buildthreadkey(cnid, std_hfs, (CatalogKey *)&iterator->key);
542 if (cnid != dcnid) {
543 printf("Requested cnid (%d / %08x) != dcnid (%d / %08x)\n", cnid, cnid, dcnid, dcnid);
613 cnid_t cnid = 0;
630 /* Save the cnid and encoding now in case there's a hard link */
631 cnid = getcnid(recp);
637 ((cnid == hfsmp->hfs_jnlfileid) || (cnid == hfsmp->hfs_jnlinfoblkid)) &&
765 builddesc(pluskey, cnid, hint, encoding, isadir(recp), descp);
772 *desc_cnid = cnid;
857 // that cnid has orphaned attributes so just skip it.
1017 cnid_t cnid = from_cdp->cd_cnid;
1021 if (cnid == fsRtDirID ||
1022 cnid == to_cdp->cd_parentcnid ||
1023 cnid == pathcnid) {
1041 if (pathcnid == cnid || pathcnid == 0) {
1271 cnid_t cnid;
1300 cnid = attrp->ca_fileid;
1303 cnid = descp->cd_cnid;
1324 cnid = temp_desc.cd_cnid;
1340 buildthreadkey(cnid, std_hfs, (CatalogKey *)&iterator->key);
1383 * For open-deleted files we need to do a lookup by cnid
1669 * catalog btree of given cnid by walking up the parent chain till it reaches
1677 cat_set_childlinkbit(struct hfsmount *hfsmp, cnid_t cnid)
1684 while ((cnid != kHFSRootFolderID) && (cnid != kHFSRootParentID) &&
1685 (cnid != hfsmp->hfs_private_desc[DIR_HARDLINKS].cd_cnid)) {
1689 retval = hfs_chash_set_childlinkbit(hfsmp->hfs_raw_dev, cnid);
1705 retval = cat_idlookup(hfsmp, cnid, 0, &desc, &attr, NULL);
1725 cnid = desc.cd_parentcnid;
1742 cat_check_link_ancestry(struct hfsmount *hfsmp, cnid_t cnid, cnid_t pointed_at_cnid)
1758 while (cnid != kHFSRootParentID) {
1760 if (pointed_at_cnid == cnid) {
1764 if ((result = getkey(hfsmp, cnid, (CatalogKey *)keyp))) {
1765 printf("cat_check_link_ancestry: getkey for %u failed\n", cnid);
1770 printf("cat_check_link_ancestry: cannot find %u\n", cnid);
1779 cnid = keyp->parentID;
1846 printf("cat_updatelink: couldn't resolve cnid %d\n", linkfileid);
1897 * cat_lookuplink - lookup a link by its cnid
2629 cnid_t cnid;
2673 cnid = INT_MAX;
2678 cnid = crp->hfsPlusFolder.folderID;
2681 if (cnid == hfsmp->hfs_private_desc[FILE_HARDLINKS].cd_cnid ||
2682 cnid == hfsmp->hfs_private_desc[DIR_HARDLINKS].cd_cnid) {
2690 cnid = crp->hfsPlusFile.fileID;
2700 cnid = crp->hfsPlusFile.hl_linkReference;
2713 cnid = crp->hfsPlusFile.hl_linkReference;
2718 ((cnid == hfsmp->hfs_jnlfileid) ||
2719 (cnid == hfsmp->hfs_jnlinfoblkid))) {
2761 (ByteCount*)&namelen, nameptr, cnid);
2770 * Also stuff the cnid in the upper 32 bits of the cookie.
2774 state->cbs_prevdirentry->d_seekoff = (state->cbs_index + 3) | ((u_int64_t)cnid << 32);
2784 catent.d_fileno = cnid;
2804 state->cbs_desc->cd_cnid = cnid;
2874 entry->d_fileno = cnid;
2902 cnid_t cnid;
2926 cnid = crp->hfsFolder.folderID;
2930 cnid = crp->hfsFile.fileID;
2948 catent.d_fileno = cnid;
2961 state->cbs_desc->cd_cnid = cnid;
3519 getkey(struct hfsmount *hfsmp, cnid_t cnid, CatalogKey * key)
3533 buildthreadkey(cnid, std_hfs, (CatalogKey *)&iterator->key);
3582 cat_getkeyplusattr(struct hfsmount *hfsmp, cnid_t cnid, CatalogKey * key, struct cat_attr *attrp)
3586 result = getkey(hfsmp, cnid, key);
3607 if ((cat_lookuplinkbyid(hfsmp, cnid, &prevlinkid, &nextlinkid) == 0) &&
3623 buildrecord(struct cat_attr *attrp, cnid_t cnid, int std_hfs, u_int32_t encoding,
3634 crp->hfsFolder.folderID = cnid;
3642 crp->hfsFile.fileID = cnid;
3656 crp->hfsPlusFolder.folderID = cnid;
3672 crp->hfsPlusFile.fileID = cnid;
3704 builddesc(const HFSPlusCatalogKey *key, cnid_t cnid, u_long hint, u_long encoding,
3741 descp->cd_cnid = cnid;
4067 cnid_t cnid = 0;
4071 cnid = crp->hfsFolder.folderID;
4074 cnid = crp->hfsFile.fileID;
4077 cnid = crp->hfsPlusFolder.folderID;
4080 cnid = crp->hfsPlusFile.fileID;
4087 return (cnid);
4096 cnid_t cnid = 0;
4101 cnid = recp->hfsThread.parentID;
4106 cnid = recp->hfsPlusThread.parentID;
4113 return (cnid);