Lines Matching defs:result
142 int result;
147 result = BTReserveSpace(hfsmp->hfs_catalog_cp->c_datafork, ops, (void*)cookie);
152 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);
356 int result;
365 result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator[0].key, 0);
366 if (result)
370 result = BTSearchRecord(fcb, &iterator[0], &file_data, &datasize, &iterator[0]);
371 if (result)
375 result = EISDIR;
388 result = BTInsertRecord(fcb, &iterator[1], &thread_data, thread_data.itemSize);
389 if (result)
399 return MacToVFSError(result);
421 int result;
434 result = BTSearchRecord(VTOF(hfsmp->hfs_catalog_vp), iterator, &btdata, NULL, NULL);
435 if (result)
457 result = ENOENT;
476 return MacToVFSError(result);
495 int result;
507 result = BTSearchRecord(VTOF(HFSTOVCB(hfsmp)->catalogRefNum), iterator,
509 if (result)
528 result = ENOENT;
532 result = cat_lookupbykey(hfsmp, keyp, allow_system_files, 0, 0, outdescp, attrp, forkp, NULL);
536 if (result == 0 && outdescp) {
544 result = ENOENT;
551 return MacToVFSError(result);
564 int result;
580 result = cat_idlookup(hfsmp, fileID, 0, outdescp, attrp, forkp);
581 if (result)
610 int result;
625 result = BTSearchRecord(VTOF(HFSTOVCB(hfsmp)->catalogRefNum), iterator,
627 if (result)
640 result = ENOENT;
778 return MacToVFSError(result);
802 int result = 0;
833 result = buildkey(hfsmp, descp, &bto->key, 0);
834 if (result)
855 result = file_attribute_exist(hfsmp, nextCNID);
856 if (result == EEXIST) {
863 if (result) goto exit;
867 result = BTInsertRecord(fcb, &bto->iterator, &btdata, datalen);
868 if ((result == btExists) && !std_hfs && (hfsmp->vcbAtrb & kHFSCatalogNodeIDsReusedMask)) {
879 if (result) goto exit;
903 result = BTInsertRecord(fcb, &bto->iterator, &btdata, datalen);
904 if (result) {
905 if (result == btExists)
906 result = EEXIST;
947 return MacToVFSError(result);
983 int result = 0;
1000 if ((result = buildkey(hfsmp, from_cdp, (HFSPlusCatalogKey *)&from_iterator->key, 0)))
1005 if ((result = buildkey(hfsmp, to_cdp, (HFSPlusCatalogKey *)&to_iterator->key, 0)))
1024 result = EINVAL;
1036 result = BTSearchRecord(fcb, &iterator, &btdata,
1038 if (result) goto exit;
1042 result = EINVAL;
1051 result = BTSearchRecord(fcb, from_iterator, &btdata,
1053 if (result) {
1054 if (std_hfs || (result != btNotFound))
1060 result = cat_lookupmangled(hfsmp, from_cdp, 0, &temp_desc, NULL, NULL);
1061 if (result)
1066 result = buildkey(hfsmp, &temp_desc, (HFSPlusCatalogKey *)&from_iterator->key, 0);
1067 if (result) {
1072 result = BTSearchRecord(fcb, from_iterator, &btdata, &datasize, from_iterator);
1073 if (result) {
1082 * directory flag because it is later used to initialize result descp
1123 result = BTInsertRecord(fcb, to_iterator, &btdata, datasize);
1124 if (result == btExists) {
1131 result = BTSearchRecord(fcb, to_iterator, &btdata, &datasize, NULL);
1132 if (result)
1137 result = EEXIST;
1141 result = BTDeleteRecord(fcb, from_iterator);
1142 if (result)
1146 result = BTInsertRecord(fcb, to_iterator, &btdata, datasize);
1147 if (result) {
1157 result = err;
1168 if (result)
1173 result = BTDeleteRecord(fcb, from_iterator);
1174 if (result) {
1184 result = err;
1218 result = BTInsertRecord(fcb, from_iterator, &btdata, datasize);
1253 return MacToVFSError(result);
1273 int result;
1299 result = getkey(hfsmp, attrp->ca_fileid, (CatalogKey *)&iterator->key);
1302 result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0);
1305 if (result)
1309 result = BTDeleteRecord(fcb, iterator);
1310 if (result) {
1311 if (std_hfs || (result != btNotFound))
1317 result = cat_lookupmangled(hfsmp, descp, 0, &temp_desc, attrp, NULL);
1318 if (result)
1323 result = buildkey(hfsmp, &temp_desc, (HFSPlusCatalogKey *)&iterator->key, 0);
1325 if (result) {
1330 result = BTDeleteRecord(fcb, iterator);
1331 if (result) {
1351 return MacToVFSError(result);
1368 int result;
1393 result = getkey(hfsmp, attrp->ca_fileid, (CatalogKey *)&iterator->key);
1395 result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0);
1397 if (result)
1403 result = BTUpdateRecord(fcb, iterator,
1405 if (result)
1414 return MacToVFSError(result);
1750 int result;
1764 if ((result = getkey(hfsmp, cnid, (CatalogKey *)keyp))) {
1769 if ((result = BTSearchRecord(fcb, ip, &btdata, NULL, NULL))) {
1830 int result;
1841 result = getkey(hfsmp, linkfileid, (CatalogKey *)&iterator->key);
1842 if (result == 0) {
1843 result = BTUpdateRecord(fcb, iterator, (IterateCallBackProcPtr)updatelink_callback, &state);
1848 return MacToVFSError(result);
1862 int result;
1870 if ((result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0))) {
1875 if ((result = BTSearchRecord(fcb, iterator, &btdata, NULL, NULL))) {
1879 result = ENOENT;
1892 return MacToVFSError(result);
1907 int result;
1915 if ((result = getkey(hfsmp, linkfileid, (CatalogKey *)&iterator->key))) {
1916 printf("cat_lookuplinkbyid: getkey for %d failed %d\n", linkfileid, result);
1921 if ((result = BTSearchRecord(fcb, iterator, &btdata, NULL, NULL))) {
1933 result = ENOLINK; /* signal to caller to get head of list */
1946 return MacToVFSError(result);
1975 int result = 0;
1998 result = buildkey(hfsmp, descp, &bto->key, 0);
1999 if (result) {
2000 printf("cat_createlink: err %d from buildkey\n", result);
2016 result = BTInsertRecord(fcb, &bto->iterator, &btdata, datalen);
2017 if ((result == btExists) && (hfsmp->vcbAtrb & kHFSCatalogNodeIDsReusedMask)) {
2026 if (result == 0) {
2031 if (result)
2056 if ((result = cat_makealias(hfsmp, attrp->ca_linkref, &bto->data.hfsPlusFile))) {
2067 result = BTInsertRecord(fcb, &bto->iterator, &btdata, datalen);
2068 if (result) {
2069 if (result == btExists)
2070 result = EEXIST;
2077 if (result) {
2079 printf("cat_createlink: err %d from BTInsertRecord\n", MacToVFSError(result));
2097 return MacToVFSError(result);
2175 int result;
2188 result = BlockAllocate(hfsmp, 0, blkcount, blkcount, 1, 1,
2191 if (result) {
2233 } else if ((result = buf_bwrite(bp))) {
2242 if (result && rsrcforkp->extents[0].startBlock != 0) {
2249 return (result);
2263 int result;
2281 if ((result = buildkey(hfsmp, descp, (HFSPlusCatalogKey *)&iterator->key, 0))) {
2286 if ((result = BTSearchRecord(fcb, iterator, &btdata, NULL, NULL))) {
2291 result = cat_delete(hfsmp, descp, &cattr);
2293 if ((result == 0) &&
2315 return (result);
2445 int result = 0;
2484 result = BTSearchRecord(fcb, iterator, NULL, NULL, iterator);
2485 if (result) {
2486 result = MacToVFSError(result);
2503 result = BTIterateRecords(fcb, kBTreeNextRecord, iterator,
2506 result = ps.error;
2508 result = MacToVFSError(result);
2509 if (result) {
2510 result = MacToVFSError(result);
2517 result = BTIterateRecords(fcb, kBTreeNextRecord, iterator,
2521 result = state.error;
2523 result = ENOENT;
2525 result = MacToVFSError(result);
2572 return MacToVFSError(result);
2623 OSErr result;
2750 result = 0;
2753 result = utf8_encodestr(cnp->ustr.unicode, namelen * sizeof(UniChar),
2757 /* Check result returned from encoding the filename to utf8 */
2758 if (result == ENAMETOOLONG) {
2759 result = ConvertUnicodeToUTF8Mangled(cnp->ustr.length * sizeof(UniChar),
2832 result = utf8_encodestr(cnp->ustr.unicode,
2900 OSErr result;
2937 result = hfs_to_utf8(hfsmp, cnp->pstr, maxnamelen + 1, (ByteCount *)&namelen, nameptr);
2942 if (result) {
2943 result = mac_roman_to_utf8(cnp->pstr, maxnamelen + 1, (ByteCount *)&namelen, nameptr);
2993 int result;
3059 result = BTSearchRecord(fcb, iterator, NULL, NULL, iterator);
3060 if (result) {
3061 result = MacToVFSError(result);
3080 result = BTIterateRecords(fcb, kBTreeNextRecord, iterator,
3083 result = ps.error;
3085 result = MacToVFSError(result);
3086 if (result) {
3087 result = MacToVFSError(result);
3121 result = BTIterateRecords(fcb, op, iterator,
3124 result = BTIterateRecords(fcb, op, iterator,
3134 if (state.cbs_extended && (result == fsBTRecordNotFoundErr)) {
3141 result = getdirentries_callback(&ckp, &crp, &state);
3201 result = state.cbs_result;
3203 result = MacToVFSError(result);
3205 if (result == ENOENT) {
3206 result = 0;
3212 return (result);
3267 int result;
3271 result = 0;
3274 ++result;
3276 --result;
3287 --result;
3290 ++result;
3300 result = 1;
3304 result = -1;
3310 return result;
3325 int result;
3331 result = 1;
3333 result = -1;
3335 result = FastRelString(searchKey->nodeName, trialKey->nodeName);
3337 return result;
3352 int result;
3358 result = 1;
3361 result = -1;
3365 result = searchKey->nodeName.length - trialKey->nodeName.length;
3367 result = FastUnicodeCompare(&searchKey->nodeName.unicode[0],
3373 return result;
3385 int result = 0;
3399 result = utf8_decodestr(descp->cd_nameptr, descp->cd_namelen,
3404 if (result) {
3405 if (result != ENAMETOOLONG)
3406 result = EINVAL; /* name has invalid characters */
3407 return (result);
3449 int result = 0;
3474 result = BTSearchRecord(VTOF(HFSTOVCB(hfsmp)->catalogRefNum), iterator,
3477 if (result == 0) {
3487 return (result ? ENOENT : 0);
3526 int result;
3538 result = BTSearchRecord(VTOF(HFSTOVCB(hfsmp)->catalogRefNum), iterator,
3540 if (result)
3561 result = ENOENT;
3569 return MacToVFSError(result);
3584 int result;
3586 result = getkey(hfsmp, cnid, key);
3588 if (result == 0) {
3589 result = cat_lookupbykey(hfsmp, key, 0, 0, 0, NULL, attrp, NULL, NULL);
3596 if ((result == 0) &&
3615 return MacToVFSError(result);
3707 int result = 0;
3721 result = utf8_encodestr(key->nodeName.unicode,
3726 if (result == ENAMETOOLONG) {
3733 result = utf8_encodestr(key->nodeName.unicode,
3750 return result;