Lines Matching defs:retval
122 int retval = 0;
148 retval = decmpfs_read_compressed(ap, &compressed, VTOCMP(vp));
150 if (retval == 0) {
159 return retval;
162 retval = 0;
180 if ((retval = cp_handle_vnop (vp, CP_READ_ACCESS, ap->a_ioflag)) != 0) {
207 retval = EFBIG;
215 retval = cluster_read(vp, uio, filesize, ap->a_ioflag | (io_throttle));
225 if (hfsmp->hfc_stage == HFC_RECORDING && retval == 0) {
256 if (retval == EAGAIN) {
259 retval = 0;
262 return (retval);
286 int retval = 0;
343 if ((retval = cp_handle_vnop (vp, CP_WRITE_ACCESS, 0)) != 0) {
389 retval = EPERM;
441 if ( (retval = hfs_lock(VTOC(vp), HFS_EXCLUSIVE_LOCK))) {
478 retval = hfs_chkdq(cp, (int64_t)(roundup(bytesToAdd, hfsmp->blockSize)),
480 if (retval)
485 retval = EINVAL;
504 retval = MacToVFSError(ExtendFileC (hfsmp, (FCB*)fp, bytesToAdd,
509 if ((actualBytesAdded == 0) && (retval == E_NONE))
510 retval = ENOSPC;
511 if (retval != E_NONE)
525 if ((retval == ENOSPC) && (filebytes > offset)) {
526 retval = 0;
533 if (retval == E_NONE) {
610 retval = cluster_write(vp, (uio_t) 0,
616 if (retval) goto ioerr_exit;
685 retval = cluster_write(vp, uio, fp->ff_size, filesize, zero_off,
687 if (retval) {
690 if (retval == EAGAIN) {
769 if (retval) {
787 retval = hfs_update(vp, TRUE);
801 if (retval == EAGAIN) {
804 retval = 0;
807 return (retval);
2389 int retval = E_NONE;
2413 retval = MacToVFSError(
2424 if (retval == E_NONE) {
2435 return (retval);
2512 int retval = E_NONE;
2566 retval = EINVAL;
2609 retval = ExtendFileC(hfsmp, (FCB*)fp, 0, 0,
2612 if (retval) {
2634 retval = MapFileBlockC(hfsmp, (FCB *)fp, ap->a_size, ap->a_foffset,
2647 if (retval) {
2654 if ((MacToVFSError(retval) != ERANGE) ||
2696 retval = 0;
2748 if (retval == 0) {
2759 return (MacToVFSError(retval));
2844 int retval;
2872 retval = E_NONE;
2884 if ((retval = hfs_getinoquota(cp)))
2885 return(retval);
2895 retval = hfs_chkdq(cp, (int64_t)(roundup(length - filebytes, blksize)),
2897 if (retval)
2924 retval = EINVAL;
2934 while ((length > filebytes) && (retval == E_NONE)) {
2936 retval = MacToVFSError(ExtendFileC(VTOVCB(vp),
2944 if (actualBytesAdded == 0 && retval == E_NONE) {
2965 if (retval)
2973 if (UBCINFOEXISTS(vp) && (vnode_issystem(vp) == 0) && retval == E_NONE) {
2994 retval = cluster_write(vp, (struct uio *) 0, fp->ff_size, zero_limit,
2998 if (retval) goto Err_Exit;
3071 retval = EINVAL;
3082 retval = MacToVFSError(TruncateFileC(VTOVCB(vp), (FCB*)fp, length, 0,
3088 if (retval == 0) {
3102 if (retval)
3121 retval = hfs_minorupdate(vp);
3126 retval = hfs_update(vp, MNT_WAIT);
3128 if (retval) {
3130 -1, -1, -1, retval, 0);
3136 (int)length, (int)fp->ff_size, (int)filebytes, retval, 0);
3138 return (retval);
3159 int retval = 0;
3185 if ((retval = hfs_getinoquota(cp))) {
3186 return(retval);
3451 int retval, retval2;
3474 if ((retval = hfs_lock(cp, HFS_EXCLUSIVE_LOCK))) {
3486 retval = EINVAL;
3502 retval = E_NONE;
3526 retval = hfs_chkdq(cp,
3529 if (retval)
3552 while ((length > filebytes) && (retval == E_NONE)) {
3556 retval = EINVAL;
3578 retval = MacToVFSError(ExtendFileC(vcb,
3585 if (retval == E_NONE) {
3610 if (retval && (startingPEOF == filebytes))
3633 retval = hfs_truncate(vp, length, 0, 0, 0, ap->a_context);
3640 if (retval && (startingPEOF == filebytes)) goto Err_Exit;
3660 if (retval == 0)
3661 retval = retval2;
3665 return (retval);
4003 int retval = 0;
4067 retval = EINVAL;
4173 if ((retval = hfs_lock(cp, HFS_EXCLUSIVE_LOCK))) {
4214 retval = error_ret;
4223 if ((retval = hfs_lock(cp, HFS_EXCLUSIVE_LOCK))) {
4251 retval = cluster_pageout(vp, upl, a_pl_offset, ap->a_f_offset,
4261 if (retval == 0) {
4282 return (retval);
4291 int retval = 0;
4319 retval = hfs_swap_BTNode (&block, vp, kSwapBTNodeHostToBig, false);
4320 if (retval)
4333 retval = vn_bwrite (ap);
4335 return (retval);
4387 int retval;
4438 // retval = hfs_fsync(vp, MNT_WAIT, 0, p);
4439 // if (retval)
4440 // return (retval);
4447 if ((retval = hfs_lock(cp, HFS_FORCE_LOCK))) {
4449 return (retval);
4481 retval = MapFileBlockC(hfsmp, (FCB *)fp, 1, growsize - 1, §or_a, NULL);
4482 if (retval) {
4483 retval = MacToVFSError(retval);
4491 retval = ExtendFileC(hfsmp, (FCB*)fp, growsize, blockHint, eflags, &newbytes);
4499 retval = MacToVFSError(retval);
4500 if (retval == 0) {
4503 retval = ENOSPC;
4507 retval = ENOSPC;
4511 retval = MapFileBlockC(hfsmp, (FCB *)fp, 1, growsize, §or_b, NULL);
4512 if (retval) {
4513 retval = MacToVFSError(retval);
4515 retval = ENOSPC;
4532 retval = ENOSPC;
4542 if (retval) {
4546 if ((retval == ENOSPC) &&
4557 retval = hfs_clonelink(vp, blksize, cred, p);
4559 retval = hfs_clonesysfile(vp, headblks, datablks, blksize, cred, p);
4561 retval = hfs_clonefile(vp, headblks, datablks, blksize);
4565 retval = EINVAL;
4569 if (retval)
4580 retval = HeadTruncateFile(hfsmp, (FCB*)fp, headblks);
4584 if (retval)
4596 if (retval == 0) {
4609 return (retval);