Lines Matching refs:result

145 	int result;
150 result = BTReserveSpace(hfsmp->hfs_catalog_cp->c_datafork, ops, (void*)cookie);
155 return MacToVFSError(result);
308 int result;
314 result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)keyp, 1);
315 if (result)
318 result = cat_lookupbykey(hfsmp, keyp, 0, descp->cd_hint, wantrsrc, outdescp, attrp, forkp, desc_cnid);
320 if (result == ENOENT) {
327 result = cat_lookupmangled(hfsmp, descp, wantrsrc, outdescp, attrp, forkp);
337 // result = cat_lookupbykey(hfsmp, keyp, descp->cd_hint, attrp, forkp);
344 return (result);
355 int result;
364 result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator[0].key, 0);
365 if (result)
369 result = BTSearchRecord(fcb, &iterator[0], &file_data, &datasize, &iterator[0]);
370 if (result)
374 result = EISDIR;
387 result = BTInsertRecord(fcb, &iterator[1], &thread_data, thread_data.itemSize);
388 if (result)
398 return MacToVFSError(result);
419 int result;
432 result = BTSearchRecord(VTOF(hfsmp->hfs_catalog_vp), iterator, &btdata, NULL, NULL);
433 if (result)
455 result = ENOENT;
474 return MacToVFSError(result);
492 int result;
504 result = BTSearchRecord(VTOF(HFSTOVCB(hfsmp)->catalogRefNum), iterator,
506 if (result)
517 result = ENOENT;
530 result = ENOENT;
539 result = ENOENT;
543 result = cat_lookupbykey(hfsmp, keyp,
549 if (result == 0 && outdescp) {
557 result = ENOENT;
564 return MacToVFSError(result);
577 int result;
597 result = cat_idlookup(hfsmp, fileID, 0,0, outdescp, attrp, forkp);
598 if (result)
612 result = utf8_decodestr(outdescp->cd_nameptr, outdescp->cd_namelen,
614 if (result) {
617 result = ConvertUnicodeToUTF8Mangled(unicodelen, unicode,
619 if ((result != 0) ||
644 int result;
660 result = BTSearchRecord(VTOF(HFSTOVCB(hfsmp)->catalogRefNum), iterator,
662 if (result)
678 result = ENOENT;
731 * also result in repairing the bad files on disk, if the corresponding
872 return MacToVFSError(result);
895 int result = 0;
926 result = buildkey(hfsmp, descp, &bto->key, 0);
927 if (result)
948 result = file_attribute_exist(hfsmp, nextCNID);
949 if (result == EEXIST) {
956 if (result) goto exit;
968 result = btExists;
972 if (result == 0) {
973 result = BTInsertRecord(fcb, &bto->iterator, &btdata, datalen);
976 if ((result == btExists) && !std_hfs && (hfsmp->vcbAtrb & kHFSCatalogNodeIDsReusedMask)) {
987 if (result) goto exit;
1011 result = BTInsertRecord(fcb, &bto->iterator, &btdata, datalen);
1012 if (result) {
1013 if (result == btExists)
1014 result = EEXIST;
1055 return MacToVFSError(result);
1090 int result = 0;
1107 if ((result = buildkey(hfsmp, from_cdp, (HFSPlusCatalogKey *)&from_iterator->key, 0)))
1112 if ((result = buildkey(hfsmp, to_cdp, (HFSPlusCatalogKey *)&to_iterator->key, 0)))
1132 result = EINVAL;
1149 result = BTSearchRecord(fcb, dir_iterator, &btdata, &datasize, NULL);
1150 if (result) {
1156 result = EINVAL;
1167 result = BTSearchRecord(fcb, from_iterator, &btdata,
1169 if (result) {
1170 if (std_hfs || (result != btNotFound))
1176 result = cat_lookupmangled(hfsmp, from_cdp, 0, &temp_desc, NULL, NULL);
1177 if (result)
1182 result = buildkey(hfsmp, &temp_desc, (HFSPlusCatalogKey *)&from_iterator->key, 0);
1183 if (result) {
1188 result = BTSearchRecord(fcb, from_iterator, &btdata, &datasize, from_iterator);
1189 if (result) {
1198 * directory flag because it is later used to initialize result descp
1239 result = BTInsertRecord(fcb, to_iterator, &btdata, datasize);
1240 if (result == btExists) {
1247 result = BTSearchRecord(fcb, to_iterator, &btdata, &datasize, NULL);
1248 if (result)
1253 result = EEXIST;
1257 result = BTDeleteRecord(fcb, from_iterator);
1258 if (result)
1262 result = BTInsertRecord(fcb, to_iterator, &btdata, datasize);
1263 if (result) {
1273 result = err;
1284 if (result)
1289 result = BTDeleteRecord(fcb, from_iterator);
1290 if (result) {
1300 result = err;
1334 result = BTInsertRecord(fcb, from_iterator, &btdata, datasize);
1369 return MacToVFSError(result);
1388 int result;
1414 result = getkey(hfsmp, attrp->ca_fileid, (CatalogKey *)&iterator->key);
1417 result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0);
1420 if (result)
1424 result = BTDeleteRecord(fcb, iterator);
1425 if (result) {
1426 if (std_hfs || (result != btNotFound))
1432 result = cat_lookupmangled(hfsmp, descp, 0, &temp_desc, attrp, NULL);
1433 if (result)
1438 result = buildkey(hfsmp, &temp_desc, (HFSPlusCatalogKey *)&iterator->key, 0);
1440 if (result) {
1445 result = BTDeleteRecord(fcb, iterator);
1446 if (result) {
1466 return MacToVFSError(result);
1484 int result;
1510 result = getkey(hfsmp, attrp->ca_fileid, (CatalogKey *)&iterator->key);
1512 result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0);
1514 if (result)
1520 result = BTUpdateRecord(fcb, iterator,
1522 if (result)
1531 return MacToVFSError(result);
1898 int result;
1912 if ((result = getkey(hfsmp, cnid, (CatalogKey *)keyp))) {
1917 if ((result = BTSearchRecord(fcb, ip, &btdata, NULL, NULL))) {
1977 int result;
1988 result = getkey(hfsmp, linkfileid, (CatalogKey *)&iterator->key);
1989 if (result == 0) {
1990 result = BTUpdateRecord(fcb, iterator, (IterateCallBackProcPtr)update_siblinglinks_callback, &state);
1997 return MacToVFSError(result);
2010 int result;
2018 if ((result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0))) {
2023 if ((result = BTSearchRecord(fcb, iterator, &btdata, NULL, NULL))) {
2027 result = ENOENT;
2041 return MacToVFSError(result);
2055 int result;
2063 if ((result = getkey(hfsmp, linkfileid, (CatalogKey *)&iterator->key))) {
2068 if ((result = BTSearchRecord(fcb, iterator, &btdata, NULL, NULL))) {
2079 result = ENOLINK; /* signal to caller to get head of list */
2093 return MacToVFSError(result);
2121 int result = 0;
2147 result = buildkey(hfsmp, descp, &bto->key, 0);
2148 if (result) {
2149 printf("hfs: cat_createlink: err %d from buildkey\n", result);
2174 result = btExists;
2178 if (result == 0) {
2179 result = BTInsertRecord(fcb, &bto->iterator, &btdata, datalen);
2182 if ((result == btExists) && (hfsmp->vcbAtrb & kHFSCatalogNodeIDsReusedMask)) {
2191 if (result == 0) {
2196 if (result)
2221 if ((result = cat_makealias(hfsmp, attrp->ca_linkref, &bto->data.hfsPlusFile))) {
2232 result = BTInsertRecord(fcb, &bto->iterator, &btdata, datalen);
2233 if (result) {
2234 if (result == btExists)
2235 result = EEXIST;
2242 if (result) {
2244 printf("hfs: cat_createlink: err %d from BTInsertRecord\n", MacToVFSError(result));
2262 return MacToVFSError(result);
2340 int result;
2353 result = BlockAllocate(hfsmp, 0, blkcount, blkcount,
2357 if (result) {
2399 } else if ((result = buf_bwrite(bp))) {
2408 if (result && rsrcforkp->extents[0].startBlock != 0) {
2415 return (result);
2428 int result;
2446 if ((result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0))) {
2451 if ((result = BTSearchRecord(fcb, iterator, &btdata, NULL, NULL))) {
2456 result = cat_delete(hfsmp, descp, &cattr);
2458 if ((result == 0) &&
2480 return (result);
2609 int result = 0;
2648 result = BTSearchRecord(fcb, iterator, NULL, NULL, iterator);
2649 if (result) {
2650 result = MacToVFSError(result);
2667 result = BTIterateRecords(fcb, kBTreeNextRecord, iterator,
2670 result = ps.error;
2672 result = MacToVFSError(result);
2673 if (result) {
2674 result = MacToVFSError(result);
2681 result = BTIterateRecords(fcb, kBTreeNextRecord, iterator,
2685 result = state.error;
2687 result = ENOENT;
2689 result = MacToVFSError(result);
2736 return MacToVFSError(result);
2787 OSErr result;
2950 result = 0;
2953 result = utf8_encodestr(cnp->ustr.unicode, namelen * sizeof(UniChar),
2957 /* Check result returned from encoding the filename to utf8 */
2958 if (result == ENAMETOOLONG) {
2972 result = ConvertUnicodeToUTF8Mangled(cnp->ustr.length * sizeof(UniChar),
3045 result = utf8_encodestr(cnp->ustr.unicode,
3113 OSErr result;
3150 result = hfs_to_utf8(hfsmp, cnp->pstr, maxnamelen + 1, (ByteCount *)&namelen, nameptr);
3155 if (result) {
3156 result = mac_roman_to_utf8(cnp->pstr, maxnamelen + 1, (ByteCount *)&namelen, nameptr);
3205 int result;
3279 result = BTSearchRecord(fcb, iterator, NULL, NULL, iterator);
3280 if (result) {
3281 result = MacToVFSError(result);
3300 result = BTIterateRecords(fcb, kBTreeNextRecord, iterator,
3303 result = ps.error;
3305 result = MacToVFSError(result);
3306 if (result) {
3307 result = MacToVFSError(result);
3341 result = BTIterateRecords(fcb, op, iterator,
3344 result = BTIterateRecords(fcb, op, iterator,
3354 if (extended && (result == fsBTRecordNotFoundErr)) {
3361 result = getdirentries_callback(&ckp, &crp, &state);
3428 result = state.cbs_result;
3430 result = MacToVFSError(result);
3432 if (result == ENOENT) {
3433 result = 0;
3439 return (result);
3493 int result;
3497 result = 0;
3500 ++result;
3502 --result;
3513 --result;
3516 ++result;
3526 result = 1;
3530 result = -1;
3536 return result;
3551 int result;
3557 result = 1;
3559 result = -1;
3561 result = FastRelString(searchKey->nodeName, trialKey->nodeName);
3563 return result;
3578 int result;
3584 result = 1;
3587 result = -1;
3591 result = searchKey->nodeName.length - trialKey->nodeName.length;
3593 result = FastUnicodeCompare(&searchKey->nodeName.unicode[0],
3599 return result;
3611 int result = 0;
3625 result = utf8_decodestr(descp->cd_nameptr, descp->cd_namelen,
3630 if (result) {
3631 if (result != ENAMETOOLONG)
3632 result = EINVAL; /* name has invalid characters */
3633 return (result);
3678 int result = 0;
3703 result = BTSearchRecord(VTOF(HFSTOVCB(hfsmp)->catalogRefNum), iterator,
3706 if (result == 0) {
3716 return (result ? ENOENT : 0);
3755 int result;
3767 result = BTSearchRecord(VTOF(HFSTOVCB(hfsmp)->catalogRefNum), iterator,
3769 if (result)
3790 result = ENOENT;
3798 return MacToVFSError(result);
3812 int result;
3814 result = getkey(hfsmp, cnid, key);
3816 if (result == 0) {
3817 result = cat_lookupbykey(hfsmp, key, 0, 0, 0, NULL, attrp, NULL, NULL);
3824 if ((result == 0) &&
3843 return MacToVFSError(result);
3935 int result = 0;
3949 result = utf8_encodestr(key->nodeName.unicode,
3954 if (result == ENAMETOOLONG) {
3961 result = utf8_encodestr(key->nodeName.unicode,
3978 return result;