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

Lines Matching defs:error

169 	int error;
237 (error = hfc_btree_create(hfsmp, HFSTOVCB(hfsmp)->blockSize, HFC_DEFAULT_FILE_COUNT))) {
240 return (error);
299 int error;
331 error = 0;
339 error = hfc_btree_open(hfsmp, &hfsmp->hfc_filevp);
340 if (error) {
347 error = hotfiles_age(hfsmp);
348 if (error) {
361 error = ENOMEM;
377 error = hotfiles_refine(hfsmp);
378 if (error) {
418 return (error);
431 int error;
447 error = 0;
455 error = hfc_btree_open(hfsmp, &hfsmp->hfc_filevp);
456 if (error) {
457 printf("hfs_recording_suspend: err %d opening btree\n", error);
462 error = EINVAL;
466 error = EPERM;
500 return (error);
523 int error = 0;
555 error = hfc_btree_create(hfsmp, HFSTOVCB(hfsmp)->blockSize, HFC_DEFAULT_FILE_COUNT);
556 if (error) {
558 printf("Error %d creating hot file b-tree on %s \n", error, hfsmp->vcbVN);
560 return (error);
567 error = hfc_btree_open(hfsmp, &hfsmp->hfc_filevp);
568 if (error) {
570 printf("Error %d opening hot file b-tree on %s \n", error, hfsmp->vcbVN);
572 return (error);
588 error = BTScanInitialize(VTOF(HFSTOVCB(hfsmp)->catalogRefNum), 0, 0, 0,
590 if (error) {
591 printf("hfs_recording_init: err %d BTScanInit\n", error);
599 error = EINVAL;
603 error = EPERM;
612 error = BTScanNextRecord(&scanstate, 0, (void **)&keyp, (void **)&datap, &dataSize);
613 if (error) {
614 if (error == btNotFound)
615 error = 0;
617 printf("hfs_recording_init: err %d BTScanNext\n", error);
654 error = BTInsertRecord(filefork, iterator, &record, record.itemSize);
655 if (error) {
656 printf("hfs_recording_init: BTInsertRecord failed %d (fileid %d)\n", error, key->fileID);
657 error = MacToVFSError(error);
667 error = BTInsertRecord(filefork, iterator, &record, record.itemSize);
668 if (error) {
669 printf("hfs_recording_init: BTInsertRecord failed %d (fileid %d)\n", error, key->fileID);
670 error = MacToVFSError(error);
692 if (error == 0)
695 return (error);
753 int error;
760 error = hfs_addhotfile_internal(vp);
762 return (error);
949 int error = 0;
966 error = EINVAL;
970 error = EPERM;
991 error = BTUpdateRecord(filefork, iterator,
994 if (error) {
995 printf("hotfiles_refine: BTUpdateRecord failed %d (file %d)\n", error, key->fileID);
996 error = MacToVFSError(error);
1009 error = BTDeleteRecord(filefork, iterator);
1010 if (error) {
1011 printf("hotfiles_refine: BTDeleteRecord failed %d (file %d)\n", error, key->fileID);
1012 error = MacToVFSError(error);
1019 error = BTInsertRecord(filefork, iterator, &record, record.itemSize);
1020 if (error) {
1021 printf("hotfiles_refine: BTInsertRecord failed %d (file %d)\n", error, key->fileID);
1022 error = MacToVFSError(error);
1041 return (error);
1064 int error = 0;
1107 error = hfs_vget(hfsmp, listp->hfl_hotfile[i].hf_fileid, &vp, 0);
1108 if (error) {
1109 if (error == ENOENT) {
1110 error = 0;
1152 error = hfs_relocate(vp, hfsmp->hfs_hotfile_start, kauth_cred_get(), current_proc());
1155 if (error) {
1172 error = EINVAL;
1177 error = BTInsertRecord(filefork, iterator, &record, record.itemSize);
1178 if (error) {
1179 printf("hotfiles_adopt: BTInsertRecord failed %d (fileid %d)\n", error, key->fileID);
1180 error = MacToVFSError(error);
1191 error = BTInsertRecord(filefork, iterator, &record, record.itemSize);
1192 if (error) {
1193 printf("hotfiles_adopt: BTInsertRecord failed %d (fileid %d)\n", error, key->fileID);
1194 error = MacToVFSError(error);
1245 return (error);
1266 int error = 0;
1304 error = 0;
1310 error = EFTYPE;
1317 error = 0;
1324 error = hfs_vget(hfsmp, key->fileID, &vp, 0);
1325 if (error) {
1326 if (error == ENOENT) {
1330 error, key->fileID);
1362 error = hfs_relocate(vp, HFSTOVCB(hfsmp)->nextAllocation, vfs_context_ucred(ctx), vfs_context_proc(ctx));
1363 if (error) {
1364 printf("hotfiles_evict: err %d relocating file %d\n", error, key->fileID);
1390 error = EINVAL;
1395 error = BTDeleteRecord(filefork, iterator);
1396 if (error) {
1397 error = MacToVFSError(error);
1402 error = BTDeleteRecord(filefork, iterator);
1403 if (error) {
1404 error = MacToVFSError(error);
1442 return (error);
1462 int error;
1487 error = EINVAL;
1491 error = EPERM;
1496 error = BTGetInformation(filefork, 0, &btinfo);
1497 if (error) {
1498 error = MacToVFSError(error);
1502 error = 0;
1509 error = BTIterateRecord(filefork, kBTreeFirstRecord, iterator, &record, &reclen);
1510 if (error) {
1511 printf("hfs_agehotfiles: BTIterateRecord: %d\n", error);
1512 error = MacToVFSError(error);
1519 error = BTIterateRecord(filefork, kBTreeNextRecord, iterator, &record, &reclen);
1520 if (error == 0) {
1523 error = EFTYPE;
1528 error = EFTYPE;
1533 error = EFTYPE;
1536 } else if ((error == fsBTEndOfIterationErr || error == fsBTRecordNotFoundErr) &&
1538 error = 0;
1539 } else if (error) {
1540 printf("hfs_agehotfiles: %d of %d BTIterateRecord: %d\n", i, numrecs, error);
1541 error = MacToVFSError(error);
1548 error = 0;
1551 error = BTDeleteRecord(filefork, prev_iterator);
1552 if (error) {
1553 printf("hfs_agehotfiles: BTDeleteRecord failed %d (file %d)\n", error, prev_key->fileID);
1554 error = MacToVFSError(error);
1562 error = BTInsertRecord(filefork, prev_iterator, &prev_record, prev_record.itemSize);
1563 if (error) {
1564 printf("hfs_agehotfiles: BTInsertRecord failed %d (file %d)\n", error, prev_key->fileID);
1565 error = MacToVFSError(error);
1573 error = BTUpdateRecord(filefork, prev_iterator,
1576 if (error) {
1578 i, numrecs, error, prev_key->fileID, newtemp);
1579 error = MacToVFSError(error);
1589 if (error == 0)
1599 return (error);
1650 int error;
1664 error = cat_lookup(hfsmp, &cdesc, 0, &cdesc, &cattr, &cfork, NULL);
1668 if (error) {
1669 printf("hfc_btree_open: cat_lookup error %d\n", error);
1670 return (error);
1674 error = hfs_getnewvnode(hfsmp, NULL, NULL, &cdesc, 0, &cattr, &cfork, &vp);
1675 if (error) {
1676 printf("hfc_btree_open: hfs_getnewvnode error %d\n", error);
1678 return (error);
1694 error = BTOpenPath(VTOF(vp), (KeyCompareProcPtr) hfc_comparekeys);
1695 if (error) {
1696 printf("hfc_btree_open: BTOpenPath error %d\n", error);
1697 error = MacToVFSError(error);
1701 if (error == 0) {
1710 return (error);
1722 int error = 0;
1730 error = hfs_lock(VTOC(vp), HFS_EXCLUSIVE_LOCK);
1731 if (error == 0) {
1733 error = BTClosePath(VTOF(vp));
1741 return (error);
1758 int error;
1763 error = VFS_ROOT(HFSTOVFS(hfsmp), &dvp, ctx);
1764 if (error) {
1765 return (error);
1784 error = VNOP_CREATE(dvp, &vp, &cname, &va, ctx);
1785 if (error) {
1786 printf("HFS: error %d creating HFBT on %s\n", error, HFSTOVCB(hfsmp)->vcbVN);
1793 if ((error = hfs_lock(VTOC(vp), HFS_EXCLUSIVE_LOCK))) {
1800 error = EFTYPE;
1824 error = ENOMEM;
1877 error = hfs_truncate(vp, (off_t)filesize, IO_NDELAY, 0, ctx);
1878 if (error) {
1879 printf("HFS: error %d growing HFBT on %s\n", error, HFSTOVCB(hfsmp)->vcbVN);
1885 if (error == 0) {
1901 error = hfs_vnop_write(&args);
1902 if (error)
1903 printf("HFS: error %d writing HFBT on %s\n", error, HFSTOVCB(hfsmp)->vcbVN);
1919 return (error);