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

Lines Matching defs:error

240         int error = 0;
245 error = E2BIG;
250 error = copystr(kstr, imgp->ip_strendp, imgp->ip_strspace, &len);
252 error = copyinstr(str, imgp->ip_strendp, imgp->ip_strspace,
257 } while (error == ENAMETOOLONG);
259 return error;
299 int error;
311 error = copyinstr(path, imgp->ip_strings, len, &len);
314 error = copystr(kpath, imgp->ip_strings, len, &len);
317 error = EFAULT;
321 if (!error) {
327 return(error);
343 * >0 Failure: exec_archhandler_ppc: error number
360 int error;
397 error = copystr(exec_archhandler_ppc.path, imgp->ip_interp_name,
399 if (error)
400 return (error);
431 * >0 Failure: interpreter: error number
447 int error;
537 error = falloc(p, &fp, &fd, imgp->ip_vfs_context);
538 if (error)
539 return(error);
553 error = copyoutstr(temp, imgp->ip_user_fname, sizeof(temp), &len);
554 if (error)
555 return(error);
576 * >0 Failure: error number
597 int resid, error;
603 error = -1;
619 error = EBADARCH;
656 error = load_return_to_errno(lret);
662 error = vn_rdwr(UIO_READ, imgp->ip_vp, imgp->ip_vdata,
666 if (error) {
672 error = EBADEXEC;
677 error = -2;
683 return (error);
695 * >0 Failure: error number
714 int error = 0;
733 error = -1;
740 error = -1;
767 error = EBADARCH;
781 error = EBADARCH;
787 error = EBADARCH;
792 error = exec_extract_strings(imgp);
793 if (error)
824 error = ENOMEM;
853 * NOTE: An error after this point indicates we have potentially
872 error = load_return_to_errno(lret);
917 error = exec_handle_sugid(imgp);
922 if (error) {
928 error = mac_proc_check_map_prot_copy_allow(p);
930 error ? FALSE : TRUE);
938 error = load_return_to_errno(LOAD_NOSPACE);
954 error = exec_copyout_strings(imgp, &ap);
955 if (error) {
970 error = copyoutptr(load_result.mach_header, ap, 8);
973 error = suword(ap, load_result.mach_header);
975 if (error) {
1137 if (error)
1138 error = 0;
1142 return(error);
1187 * exec_check_permissions:ENOEXEC Executable file format error
1188 * exec_check_permissions:ETXTBSY Text file busy [misuse of error code]
1198 int error;
1205 error = execargs_alloc(imgp);
1206 if (error)
1215 error = exec_save_path(imgp, imgp->ip_user_fname, imgp->ip_seg);
1216 if (error) {
1226 error = namei(&nd);
1227 if (error)
1234 error = exec_check_permissions(imgp);
1235 if (error)
1244 error = vn_rdwr(UIO_READ, imgp->ip_vp, imgp->ip_vdata, PAGE_SIZE, 0,
1248 if (error)
1254 error = EBADEXEC;
1257 error = -1;
1258 for(i = 0; error == -1 && execsw[i].ex_imgact != NULL; i++) {
1260 error = (*execsw[i].ex_imgact)(imgp);
1262 switch (error) {
1278 error = ENOMEM;
1314 if (error == 0 && kauth_authorize_fileop_has_listeners()) {
1329 return (error);
1413 int error = 0;
1448 error = open1(imgp->ip_vfs_context,
1455 * If there's an error, or we get the right fd by
1460 if (error || ival[0] == psfa->psfaa_filedes)
1465 * If we didn't fall out from an error, we ended up
1476 * fd we wanted, the error will stop us.
1478 error = dup2(p, &dup2a, ival);
1479 if (error)
1487 error = close_nocancel(p, &ca, ival);
1501 * fd we wanted, the error will stop us.
1503 error = dup2(p, &dup2a, ival);
1512 error = close_nocancel(p, &ca, ival);
1517 error = EINVAL;
1521 if (error)
1525 return (error);
1540 * ENOEXEC Executable file format error
1547 * exec_activate_image:ENOEXEC Executable file format error
1548 * exec_activate_image:ETXTBSY Text file busy [misuse of error code]
1568 int error, sig;
1597 error = copyin(uap->adesc, &px_args, sizeof(px_args));
1601 error = copyin(uap->adesc, &px_args32, sizeof(px_args32));
1614 if (error)
1622 if ((error = copyin(px_args.attrp, &px_sa, sizeof(px_sa))) != 0)
1632 error = EINVAL;
1637 error = ENOMEM;
1642 if ((error = copyin(px_args.file_actions, px_sfap,
1650 error = EINVAL;
1657 error = ENOMEM;
1662 if ((error = copyin(px_args.port_actions, px_spap,
1669 if ((error = vfork(p, NULL, ival)) != 0)
1690 (error = exec_handle_file_actions(imgp)) != 0) {
1698 error = ENOTSUP;
1701 if((error = exec_handle_port_actions(imgp)) != 0)
1716 if((error = setpgid(p, &spga, ival)) != 0)
1753 error = setsigvec(p, sig, &vec);
1770 error = EINVAL;
1774 error = ENOTSUP;
1782 error = mac_execve_enter(uap->mac_p, imgp);
1783 if (error)
1788 if ((error = exec_activate_image(imgp)) != 0)
1792 if (error == -1)
1793 error = ENOEXEC;
1794 if (error == 0) {
1813 if (error) {
1814 DTRACE_PROC1(exec__failure, int, error);
1826 retval[0] = error;
1835 vfork_return(p, NULL, error);
1839 if (!error) {
1850 DTRACE_PROC1(exec__failure, int, error);
1853 return(error);
1872 * __mac_execve:ENOEXEC Executable file format error
1873 * __mac_execve:ETXTBSY Text file busy [misuse of error code]
1905 * ENOEXEC Executable file format error
1912 * exec_activate_image:ENOEXEC Executable file format error
1913 * exec_activate_image:ETXTBSY Text file busy [misuse of error code]
1927 int error;
1980 error = mac_execve_enter(uap->mac_p, imgp);
1981 if (error) {
1983 return (error);
1988 error = exec_activate_image(imgp);
1993 if (error == -1)
1994 error = ENOEXEC;
1996 if (error == 0) {
2009 if (!error) {
2025 DTRACE_PROC1(exec__failure, int, error);
2028 return(error);
2051 int error;
2057 error = copyin(froma, &i, 4);
2060 error = copyin(froma, toptr, 8);
2062 return (error);
2085 int error;
2091 error = copyout(&i, ptr, 4);
2093 error = copyout(&ua, ptr, 8);
2095 return (error);
2176 int error;
2213 error = copyoutstr(imgp->ip_strings, path_area,
2216 if (error)
2273 error = E2BIG;
2276 error = copyoutstr(argv, string_area,
2282 } while (error == ENAMETOOLONG);
2283 if (error == EFAULT || error == E2BIG)
2291 return(error);
2318 int error = 0;
2341 error = copyinptr(argv, &arg, ptr_size);
2342 if (error)
2346 error = exec_add_string(imgp, imgp->ip_user_fname);
2347 if (error)
2356 error = copyinptr(argv, &arg, ptr_size);
2357 if (error)
2365 error = EFAULT;
2371 error = exec_add_string(imgp, arg);
2372 if (error)
2381 error = copyinptr(envv, &env, ptr_size);
2382 if (error)
2389 error = EFAULT;
2395 error = exec_add_string(imgp, env);
2396 if (error)
2401 return error;
2418 * ENOEXEC Executable file format error
2419 * ETXTBSY Text file busy [misuse of error code]
2429 int error;
2444 if ((error = vnode_getattr(vp, vap, imgp->ip_vfs_context)) != 0)
2445 return (error);
2471 error = mac_vnode_check_exec(imgp->ip_vfs_context, vp, imgp);
2472 if (error)
2473 return (error);
2481 if ((error = vnode_authorize(vp, NULL, action, imgp->ip_vfs_context)) != 0)
2482 return (error);
2510 return (error);
2547 int error = 0;
2681 if ((error = vn_open(&nd1, FREAD, 0)) == 0) {
2709 if ((error = falloc(p, &fp, &indx, imgp->ip_vfs_context)) != 0)
2712 if ((error = vnode_ref_ext(dev_null, FREAD)) != 0) {
2763 return(error);
2866 int error;
2928 error = execve(p,&init_exec_args,retval);
2929 if (error)
2931 init_program_name, error);
2937 * Description: Convert a load_return_t (Mach error) to an errno (BSD error)
2939 * Parameters: lrtn Mach error number
2941 * Returns: (int) BSD error number
2950 * EIO An I/O error occurred