Lines Matching refs:descp

96                   struct cat_desc *descp, struct cat_attr *attrp, struct cat_fork *forkp, cnid_t *desc_cnid);
98 int cat_lookupmangled(struct hfsmount *hfsmp, struct cat_desc *descp, int wantrsrc,
110 static int buildkey(struct hfsmount *hfsmp, struct cat_desc *descp,
120 int isdir, struct cat_desc *descp);
138 static int cat_update_internal(struct hfsmount *hfsmp, int update_hardlink, struct cat_desc *descp, struct cat_attr *attrp,
243 struct cat_desc *descp)
258 builddesc(pluskey, getcnid(recp), 0, encoding, isadir(recp), descp);
271 cat_releasedesc(struct cat_desc *descp)
275 if (descp == NULL)
278 if ((descp->cd_flags & CD_HASBUF) &&
279 (descp->cd_nameptr != NULL)) {
280 name = descp->cd_nameptr;
281 descp->cd_nameptr = NULL;
282 descp->cd_namelen = 0;
285 descp->cd_nameptr = NULL;
286 descp->cd_namelen = 0;
287 descp->cd_flags &= ~CD_HASBUF;
302 cat_lookup(struct hfsmount *hfsmp, struct cat_desc *descp, int wantrsrc,
314 result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)keyp, 1);
318 result = cat_lookupbykey(hfsmp, keyp, 0, descp->cd_hint, wantrsrc, outdescp, attrp, forkp, desc_cnid);
327 result = cat_lookupmangled(hfsmp, descp, wantrsrc, outdescp, attrp, forkp);
337 // result = cat_lookupbykey(hfsmp, keyp, descp->cd_hint, attrp, forkp);
348 cat_insertfilethread(struct hfsmount *hfsmp, struct cat_desc *descp)
364 result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator[0].key, 0);
572 cat_lookupmangled(struct hfsmount *hfsmp, struct cat_desc *descp, int wantrsrc,
586 fileID = GetEmbeddedFileID(descp->cd_nameptr, descp->cd_namelen, &prefixlen);
601 if (descp->cd_parentcnid != outdescp->cd_parentcnid)
620 ((u_int16_t)descp->cd_namelen != utf8len) ||
621 (bcmp(descp->cd_nameptr, utf8, utf8len) != 0)) {
638 struct cat_desc *descp, struct cat_attr *attrp, struct cat_fork *forkp, cnid_t *desc_cnid)
849 if (descp != NULL) {
859 builddesc(pluskey, cnid, hint, encoding, isadir(recp), descp);
886 cat_create(struct hfsmount *hfsmp, struct cat_desc *descp, struct cat_attr *attrp,
926 result = buildkey(hfsmp, descp, &bto->key, 0);
1198 * directory flag because it is later used to initialize result descp
1382 cat_delete(struct hfsmount *hfsmp, struct cat_desc *descp, struct cat_attr *attrp)
1399 if (descp->cd_cnid < kHFSFirstUserCatalogNodeID ||
1400 descp->cd_parentcnid == kHFSRootParentID)
1413 if (descp->cd_namelen == 0) {
1417 result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0);
1418 cnid = descp->cd_cnid;
1432 result = cat_lookupmangled(hfsmp, descp, 0, &temp_desc, attrp, NULL);
1471 * cat_update_internal - update the catalog node described by descp
1477 cat_update_internal(struct hfsmount *hfsmp, int update_hardlink, struct cat_desc *descp, struct cat_attr *attrp,
1489 state.s_desc = descp;
1507 ((descp->cd_cnid != attrp->ca_fileid) ||
1508 (descp->cd_namelen == 0) ||
1512 result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0);
1518 iterator->hint.nodeNum = descp->cd_hint;
1526 descp->cd_hint = iterator->hint.nodeNum;
1535 * cat_update - update the catalog node described by descp
1539 cat_update(struct hfsmount *hfsmp, struct cat_desc *descp, struct cat_attr *attrp,
1542 return cat_update_internal(hfsmp, false, descp, attrp, dataforkp, rsrcforkp);
1552 struct cat_desc *descp;
1559 descp = state->s_desc;
1570 if ((ckp->hfs.parentID != descp->cd_parentcnid) ||
1571 (dir->folderID != descp->cd_cnid))
1586 if ((ckp->hfs.parentID != descp->cd_parentcnid) ||
1643 dir->textEncoding = descp->cd_encoding;
1711 file->textEncoding = descp->cd_encoding;
1803 if ((descp->cd_cnid != attrp->ca_fileid) || (attrp->ca_linkcount > 1 ) ||
2004 cat_lookuplink(struct hfsmount *hfsmp, struct cat_desc *descp, cnid_t *linkfileid, cnid_t *prevlinkid, cnid_t *nextlinkid)
2018 if ((result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0))) {
2109 cat_createlink(struct hfsmount *hfsmp, struct cat_desc *descp, struct cat_attr *attrp,
2147 result = buildkey(hfsmp, descp, &bto->key, 0);
2220 if (descp->cd_flags & CD_ISDIR) {
2422 cat_deletelink(struct hfsmount *hfsmp, struct cat_desc *descp)
2432 cattr.ca_fileid = descp->cd_cnid;
2435 if (descp->cd_flags & CD_ISDIR) {
2446 if ((result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0))) {
2456 result = cat_delete(hfsmp, descp, &cattr);
2459 (descp->cd_flags & CD_ISDIR) &&
3607 buildkey(struct hfsmount *hfsmp, struct cat_desc *descp,
3614 if (descp->cd_namelen == 0 || descp->cd_nameptr[0] == '\0')
3617 key->parentID = descp->cd_parentcnid;
3623 if ((descp->cd_flags & CD_DECOMPOSED) == 0)
3625 result = utf8_decodestr(descp->cd_nameptr, descp->cd_namelen,
3933 int isdir, struct cat_desc *descp)
3966 descp->cd_parentcnid = key->parentID;
3967 descp->cd_nameptr = (const u_int8_t *)vfs_addname((char *)nameptr, utf8len, 0, 0);
3968 descp->cd_namelen = utf8len;
3969 descp->cd_cnid = cnid;
3970 descp->cd_hint = hint;
3971 descp->cd_flags = CD_DECOMPOSED | CD_HASBUF;
3973 descp->cd_flags |= CD_ISDIR;
3974 descp->cd_encoding = encoding;
4438 * described by descp using the data from attrp and forkp.
4442 struct cat_desc *descp, struct cat_attr *attrp, struct cat_fork *forkp)
4445 return cat_update_internal(hfsmp, true, descp, attrp, NULL, forkp);
4447 return cat_update_internal(hfsmp, true, descp, attrp, forkp, NULL);