Lines Matching defs:error
490 int error = 0;
523 error = KERN_FAILURE;
535 error = KERN_PROTECTION_FAILURE;
540 error = check_task_access(tfpport, proc_selfpid(), kauth_getgid(), pid);
542 if (error != MACH_MSG_SUCCESS) {
543 if (error == MACH_RCV_INTERRUPTED)
544 error = KERN_ABORTED;
546 error = KERN_FAILURE;
551 error = mac_proc_check_get_task(kauth_cred_get(), p);
552 if (error) {
553 error = KERN_FAILURE;
565 error = KERN_SUCCESS;
573 AUDIT_MACH_SYSCALL_EXIT(error);
574 return(error);
601 int error = 0, refheld = 0;
638 error = mac_proc_check_get_task_name(kauth_cred_get(), p);
639 if (error) {
653 error = KERN_SUCCESS;
664 error = KERN_FAILURE;
670 AUDIT_MACH_SYSCALL_EXIT(error);
671 return(error);
678 int error = 0;
681 error = SYSCTL_OUT(req, arg1, sizeof(int));
682 if (error || req->newptr == USER_ADDR_NULL)
683 return(error);
688 if ((error = SYSCTL_IN(req, &new_value, sizeof(int)))) {
695 error = EINVAL;
697 return(error);
754 int error;
769 error = ENOMEM;
772 error = copyout(&start_address,
775 if (error) {
779 "copyout(0x%llx) error %d\n",
782 error));
788 error = EINVAL;
794 (uint64_t)uap->start_address, (uint64_t)start_address, error));
796 return error;
815 int error;
847 error = fp_lookup(p, fd, &fp, 0);
848 if (error) {
851 "fd=%d lookup failed (error=%d)\n",
852 current_thread(), p->p_pid, p->p_comm, fd, error));
863 error = EINVAL;
873 error = EPERM;
878 error = vnode_getwithref((vnode_t) fp->f_fglob->fg_data);
879 if (error) {
882 "fd=%d getwithref failed (error=%d)\n",
883 current_thread(), p->p_pid, p->p_comm, fd, error));
895 error = EINVAL;
910 error = EPERM;
917 error = vnode_getattr(vp, &va, vfs_context_current());
918 if (error) {
921 "vnode_getattr(%p) failed (error=%d)\n",
923 vp, vp->v_name, vp, error));
932 error = EPERM;
937 error = vnode_size(vp, &fs, vfs_context_current());
938 if (error) {
941 "vnode_size(%p) failed (error=%d)\n",
943 vp, vp->v_name, vp, error));
956 error = EINVAL;
969 error = 0; /* no mappings: we're done ! */
979 error = EINVAL;
984 error = copyin(user_mappings,
987 if (error) {
990 "copyin(0x%llx, %d) failed (error=%d)\n",
992 vp, vp->v_name, (uint64_t)user_mappings, mappings_count, error));
1022 error = EFAULT;
1025 error = EPERM;
1028 error = ENOMEM;
1033 error = EINVAL;
1039 error = 0;
1058 * ubc_map() still holds it for us in the non-error case
1077 return error;