Module Name: src Committed By: maxv Date: Mon Feb 17 19:29:46 UTC 2014
Modified Files: src/sys/kern: exec_script.c kern_exec.c Log Message: Cosmetic; just replace whitespaces by tabs To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/kern/exec_script.c cvs rdiff -u -r1.375 -r1.376 src/sys/kern/kern_exec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/exec_script.c diff -u src/sys/kern/exec_script.c:1.67 src/sys/kern/exec_script.c:1.68 --- src/sys/kern/exec_script.c:1.67 Thu Sep 19 18:50:59 2013 +++ src/sys/kern/exec_script.c Mon Feb 17 19:29:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_script.c,v 1.67 2013/09/19 18:50:59 christos Exp $ */ +/* $NetBSD: exec_script.c,v 1.68 2014/02/17 19:29:46 maxv Exp $ */ /* * Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.67 2013/09/19 18:50:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.68 2014/02/17 19:29:46 maxv Exp $"); #if defined(SETUIDSCRIPTS) && !defined(FDSCRIPTS) #define FDSCRIPTS /* Need this for safe set-id scripts. */ @@ -95,7 +95,7 @@ exec_script_modcmd(modcmd_t cmd, void *a default: return ENOTTY; - } + } } /* @@ -345,10 +345,10 @@ fail: #endif /* kill the opened file descriptor, else close the file */ - if (epp->ep_flags & EXEC_HASFD) { - epp->ep_flags &= ~EXEC_HASFD; - fd_close(epp->ep_fd); - } else if (scriptvp) { + if (epp->ep_flags & EXEC_HASFD) { + epp->ep_flags &= ~EXEC_HASFD; + fd_close(epp->ep_fd); + } else if (scriptvp) { vn_lock(scriptvp, LK_EXCLUSIVE | LK_RETRY); VOP_CLOSE(scriptvp, FREAD, l->l_cred); vput(scriptvp); @@ -363,11 +363,11 @@ fail: kmem_free(shellargp, shellargp_len); } - /* - * free any vmspace-creation commands, - * and release their references - */ - kill_vmcmds(&epp->ep_vmcmds); + /* + * free any vmspace-creation commands, + * and release their references + */ + kill_vmcmds(&epp->ep_vmcmds); - return error; + return error; } Index: src/sys/kern/kern_exec.c diff -u src/sys/kern/kern_exec.c:1.375 src/sys/kern/kern_exec.c:1.376 --- src/sys/kern/kern_exec.c:1.375 Fri Feb 14 16:35:40 2014 +++ src/sys/kern/kern_exec.c Mon Feb 17 19:29:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.375 2014/02/14 16:35:40 christos Exp $ */ +/* $NetBSD: kern_exec.c,v 1.376 2014/02/17 19:29:46 maxv Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.375 2014/02/14 16:35:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.376 2014/02/17 19:29:46 maxv Exp $"); #include "opt_exec.h" #include "opt_execfmt.h" @@ -516,7 +516,7 @@ sys_execve(struct lwp *l, const struct s SCARG(uap, envp), execve_fetch_element); } -int +int sys_fexecve(struct lwp *l, const struct sys_fexecve_args *uap, register_t *retval) { @@ -571,9 +571,9 @@ exec_autoload(void) list = (nexecs == 0 ? native : compat); for (i = 0; list[i] != NULL; i++) { if (module_autoload(list[i], MODULE_CLASS_EXEC) != 0) { - continue; + continue; } - yield(); + yield(); } #endif } @@ -593,7 +593,7 @@ execve_loadvm(struct lwp *l, const char KASSERT(data != NULL); p = l->l_proc; - modgen = 0; + modgen = 0; SDT_PROBE(proc,,,exec, path, 0, 0, 0, 0); @@ -951,8 +951,8 @@ execve_runproc(struct lwp *l, struct exe data->ed_pack.ep_flags & EXEC_TOPDOWN_VM); /* record proc's vnode, for use by procfs and others */ - if (p->p_textvp) - vrele(p->p_textvp); + if (p->p_textvp) + vrele(p->p_textvp); vref(data->ed_pack.ep_vp); p->p_textvp = data->ed_pack.ep_vp; @@ -1885,8 +1885,8 @@ spawn_return(void *arg) } error = fd_open(fae->fae_path, fae->fae_oflag, fae->fae_mode, &newfd); - if (error) - break; + if (error) + break; if (newfd != fae->fae_fildes) { error = dodup(l, newfd, fae->fae_fildes, 0, &retval); @@ -2022,8 +2022,8 @@ spawn_return(void *arg) return; report_error: - if (have_reflock) { - /* + if (have_reflock) { + /* * We have not passed through execve_runproc(), * which would have released the p_reflock and also * taken ownership of the sed_exec part of spawn_data, @@ -2423,14 +2423,14 @@ do_posix_spawn(struct lwp *l1, pid_t *pi return error; error_exit: - if (have_exec_lock) { + if (have_exec_lock) { execve_free_data(&spawn_data->sed_exec); rw_exit(&p1->p_reflock); - rw_exit(&exec_lock); + rw_exit(&exec_lock); } mutex_exit(&spawn_data->sed_mtx_child); spawn_exec_data_release(spawn_data); - + return error; }