Lines Matching defs:result

62 	int         result;
274 int result;
289 if ((result = hfs_lock(cp, HFS_SHARED_LOCK, HFS_LOCK_DEFAULT))) {
290 return (result);
318 result = uiomove((caddr_t)&finderinfo , bufsize, uio);
320 return (result);
331 if ((result = hfs_lock(cp, HFS_EXCLUSIVE_LOCK, HFS_LOCK_DEFAULT))) {
332 return (result);
345 result = hfs_vgetrsrc(hfsmp, vp, &rvp);
347 if (result) {
348 return (result);
358 result = VNOP_READ(rvp, uio, 0, ap->a_context);
361 (result == 0) &&
367 * in that case, result != 0 and we won't proceed.
369 * However, if result == 0, it will have returned no data
376 result = VNOP_READ(rvp, uio, 0, decmpfs_ctx);
390 return (result);
401 if ((result = hfs_lock(cp, HFS_SHARED_LOCK, HFS_LOCK_DEFAULT))) {
402 return (result);
406 result = hfs_getxattr_internal (cp, ap, VTOHFS(cp->c_vp), 0);
410 return MacToVFSError(result);
457 int result = 0;
472 result = ENOATTR;
481 result = ENOMEM;
492 result = ENOMEM;
499 result = hfs_buildattrkey(target_id, ap->a_name, (HFSPlusAttrKey *)&iterator->key);
500 if (result) {
506 result = BTSearchRecord(btfile, iterator, &btdata, &datasize, NULL);
509 if (result) {
510 if (result == btNotFound) {
511 result = ENOATTR;
533 result = ENOATTR;
540 result = ERANGE;
550 result = ENOMEM;
559 result = hfs_buildattrkey(target_id, ap->a_name, (HFSPlusAttrKey *)&iterator->key);
560 if (result) {
566 result = BTSearchRecord(btfile, iterator, &btdata, &datasize, NULL);
568 if (result) {
569 if (result == btNotFound) {
570 result = ENOATTR;
577 result = uiomove((caddr_t) &recp->attrData.attrData , recp->attrData.attrSize, uio);
588 result = ENOATTR;
596 result = ERANGE;
611 result = ERANGE;
621 result = ENOMEM;
636 result = BTSearchRecord(btfile, iterator, &btdata, &datasize, NULL);
637 if (result ||
642 result = ENOATTR;
655 result = ENOATTR;
657 result = read_attr_data(hfsmp, uio, attrlen, extentbuf);
662 result = read_attr_data(hfsmp, uio, recp->forkData.theFork.logicalSize, recp->forkData.theFork.extents);
669 result = ENOATTR;
681 return result;
708 int result;
721 result = decmpfs_decompress_file(vp, VTOCMP(vp), -1, 1, 0);
722 if (result != 0)
723 return result;
746 if ((result = uiomove((caddr_t)&finderinfo , attrsize, uio))) {
747 return (result);
751 if ((result = hfs_lock(VTOC(vp), HFS_EXCLUSIVE_LOCK, HFS_LOCK_DEFAULT))) {
752 return (result);
859 result = hfs_update(vp, FALSE);
862 return (result);
873 if ((result = hfs_lock(VTOC(vp), HFS_EXCLUSIVE_LOCK, HFS_LOCK_DEFAULT))) {
874 return (result);
901 result = hfs_vgetrsrc(hfsmp, vp, &rvp);
903 if (result) {
904 return (result);
907 result = VNOP_WRITE(rvp, uio, 0, ap->a_context);
919 if ((result = hfs_lock(cp, HFS_EXCLUSIVE_LOCK, HFS_LOCK_DEFAULT))) {
922 return result;
926 result = hfs_fsync (rvp, MNT_NOWAIT, 0, vfs_context_proc (ap->a_context));
931 return (result);
943 result = E2BIG;
957 result = ENOMEM;
961 result = uiomove((caddr_t)user_data_ptr, attrsize, uio);
962 if (result) {
967 result = hfs_lock(VTOC(vp), HFS_EXCLUSIVE_LOCK, HFS_LOCK_DEFAULT);
968 if (result) {
977 result = hfs_setxattr_internal (cp, user_data_ptr, attrsize, ap, VTOHFS(vp), 0);
987 return (result == btNotFound ? ENOATTR : MacToVFSError(result));
1030 int result = 0;
1054 result = EINVAL;
1064 result = ENOENT;
1072 result = hfs_create_attr_btree(hfsmp, ATTRIBUTE_FILE_NODE_SIZE,
1074 if (result) {
1090 result = ENOMEM;
1094 result = hfs_buildattrkey(target_id, ap->a_name, (HFSPlusAttrKey *)&iterator->key);
1095 if (result) {
1108 result = ENOATTR;
1113 result = EEXIST;
1131 result = EPERM;
1141 result = ENOMEM;
1145 result = alloc_attr_blks(hfsmp, attrsize, extentbufsize, extentptr, &allocatedblks);
1146 if (result) {
1151 result = write_attr_data(hfsmp, uio, attrsize, extentptr);
1152 if (result) {
1156 hfsmp->vcbVN, result, name ? name : "", ap->a_name);
1165 result = remove_attribute_records(hfsmp, iterator);
1166 if (result) {
1170 hfsmp->vcbVN, result, name ? name : "", ap->a_name);
1180 result = ENOMEM;
1196 result = BTInsertRecord(btfile, iterator, &btdata, btdata.itemSize);
1197 if (result) {
1199 hfsmp->vcbVN, target_id, ap->a_name, result);
1219 result = BTInsertRecord(btfile, iterator, &btdata, btdata.itemSize);
1220 if (result) {
1222 hfsmp->vcbVN, target_id, ap->a_name, result);
1230 result = remove_attribute_records(hfsmp, iterator);
1231 if (result) {
1240 result = ENOMEM;
1258 result = EPERM;
1261 result = uiomove((caddr_t)&recp->attrData.attrData, attrsize, uio);
1264 if (result) {
1273 result = BTInsertRecord(btfile, iterator, &btdata, btdata.itemSize);
1283 if (result == 0) {
1298 if (result && allocatedblks) {
1314 return result;
1340 int result;
1366 if ((result = hfs_lock(cp, HFS_EXCLUSIVE_LOCK, HFS_LOCK_DEFAULT))) {
1367 return (result);
1373 result = hfs_vgetrsrc(hfsmp, vp, &rvp);
1375 if (result) {
1376 return (result);
1384 if ((result = hfs_lock(VTOC(rvp), HFS_EXCLUSIVE_LOCK, HFS_LOCK_DEFAULT))) {
1387 return (result);
1393 if ((result = hfs_start_transaction(hfsmp))) {
1397 return (result);
1400 result = hfs_truncate(rvp, (off_t)0, IO_NDELAY, 0, ap->a_context);
1401 if (result == 0) {
1404 result = hfs_update(vp, FALSE);
1412 return (result);
1422 if ((result = hfs_lock(cp, HFS_EXCLUSIVE_LOCK, HFS_LOCK_DEFAULT))) {
1423 return (result);
1515 if ((result = hfs_lock(cp, HFS_EXCLUSIVE_LOCK, HFS_LOCK_DEFAULT))) {
1519 result = hfs_buildattrkey(cp->c_fileid, ap->a_name, (HFSPlusAttrKey *)&iterator->key);
1520 if (result) {
1525 result = EINVAL;
1530 result = remove_attribute_records(hfsmp, iterator);
1534 if (result == 0) {
1540 result = file_attribute_exist(hfsmp, cp->c_fileid);
1541 if (result == 0) {
1544 if (result == EEXIST) {
1545 result = 0;
1562 return MacToVFSError(result);
1583 int result = 0;
1593 result = ENOMEM;
1599 result = hfs_buildattrkey(fileID, NULL, key);
1600 if (result) {
1605 result = BTSearchRecord(btfile, iterator, NULL, NULL, NULL);
1606 if (result && (result != btNotFound)) {
1610 result = BTIterateRecord(btfile, kBTreeNextRecord, iterator, NULL, NULL);
1614 if ((result && (result == btNotFound)) || (key->fileID != fileID)) {
1615 result = 0;
1617 result = EEXIST;
1624 return result;
1644 int result;
1651 result = BTSearchRecord(btfile, iterator, &btdata, &datasize, NULL);
1652 if (result) {
1685 result = BTSearchRecord(btfile, iterator, &btdata, &datasize, NULL);
1686 if (result ||
1690 hfsmp->vcbVN, MacToVFSError(result), attrdata.recordType != kHFSPlusAttrExtents, totalblks);
1691 result = ENOATTR;
1704 result = BTDeleteRecord(btfile, iterator);
1708 return (result == btNotFound ? ENOATTR : MacToVFSError(result));
1737 int result;
1760 if ((result = hfs_lock(cp, HFS_SHARED_LOCK, HFS_LOCK_DEFAULT))) {
1762 return (result);
1788 result = ERANGE;
1791 result = uiomove(XATTR_FINDERINFO_NAME,
1793 if (result)
1809 result = ERANGE;
1812 result = uiomove(XATTR_RESOURCEFORK_NAME,
1814 if (result)
1824 result = 0;
1830 result = 0;
1837 result = ENOMEM;
1841 result = hfs_buildattrkey(cp->c_fileid, NULL, (HFSPlusAttrKey *)&iterator->key);
1842 if (result)
1853 if ((result = vslock(user_start, user_len)) != 0) {
1860 result = BTSearchRecord(btfile, iterator, NULL, NULL, NULL);
1861 if (result && result != btNotFound) {
1867 state.result = 0;
1879 result = BTIterateRecords(btfile, kBTreeNextRecord, iterator,
1886 if (state.result || result == btNotFound)
1887 result = state.result;
1899 return MacToVFSError(result);
1911 int result;
1914 state->result = 0;
1925 result = utf8_encodestr(key->attrName, key->attrNameLen * sizeof(UniChar),
1927 if (result) {
1928 state->result = result;
1945 state->result = ERANGE;
1948 result = uiomove((caddr_t) attrname, bytecount, state->uio);
1949 if (result) {
1950 state->result = result;
1973 int result, lockflags;
1990 result = EINVAL;
2001 result = BTIterateRecord(btfile, kBTreeNextRecord, iterator, NULL, NULL);
2002 if (result || key->fileID != fileid) {
2007 result = remove_attribute_records(hfsmp, iterator);
2010 if (result) {
2011 printf("hfs_removeallattr: unexpected err %d\n", result);
2016 if (result)
2021 return (result == btNotFound ? 0: MacToVFSError(result));
2052 int result;
2065 result = hfs_create_attr_btree(hfsmp, ATTRIBUTE_FILE_NODE_SIZE,
2067 if (result) {
2068 return (result);
2087 result = EINVAL;
2096 result = BTDeleteRecord(btfile, iterator);
2097 if (result == btNotFound)
2098 result = 0;
2116 result = BTInsertRecord(btfile, iterator, &btdata, datasize);
2117 if (result == btExists)
2118 result = 0;
2140 return MacToVFSError(result);
2155 int result;
2159 result = 0;
2162 ++result;
2164 --result;
2175 --result;
2178 ++result;
2188 result = 1;
2192 result = -1;
2196 if (result)
2197 return (result);
2208 return result;
2219 int result = 0;
2226 result = utf8_decodestr((const u_int8_t *)attrname, strlen(attrname), key->attrName,
2228 if (result) {
2229 if (result != ENAMETOOLONG)
2230 result = EINVAL; /* name has invalid characters */
2231 return (result);
2320 int result = 0;
2361 result = hfs_getnewvnode(hfsmp, NULL, NULL, &cat_desc, 0, &cat_attr,
2363 if (result == 0) {
2367 return (result);
2382 int result = 0;
2401 result = cluster_read(evp, uio, VTOF(evp)->ff_size, IO_SYNC | IO_UNIT);
2405 iosize, extents[i].startBlock, extents[i].blockCount, result);
2407 if (result)
2416 return (result);
2432 int result = 0;
2451 result = cluster_write(evp, uio, filesize, filesize, filesize,
2455 iosize, extents[i].startBlock, extents[i].blockCount, result);
2457 if (result)
2466 return (result);
2480 int result = 0;
2494 result = BlockAllocate(hfsmp, startblk, blkcnt, blkcnt, 0,
2500 if (result == dskFulErr) {
2501 result = BlockAllocate(hfsmp, startblk, blkcnt, blkcnt, HFS_ALLOC_FLUSHTXN,
2508 blkcnt, extents[i].startBlock, extents[i].blockCount, result);
2510 if (result) {
2522 result = ENOSPC;
2537 return MacToVFSError(result);