summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_shell.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-07-27 17:31:03 +0000
committeralc <alc@FreeBSD.org>2010-07-27 17:31:03 +0000
commit256c63de2893fe3b3b9d97763bc4871052984f8f (patch)
treea92c11fd0f16b4fd2595573c50330d0e933b83dc /sys/kern/imgact_shell.c
parent3571b845b3692def492231ca1420482177b1d056 (diff)
downloadFreeBSD-src-256c63de2893fe3b3b9d97763bc4871052984f8f.zip
FreeBSD-src-256c63de2893fe3b3b9d97763bc4871052984f8f.tar.gz
Introduce exec_alloc_args(). The objective being to encapsulate the
details of the string buffer allocation in one place. Eliminate the portion of the string buffer that was dedicated to storing the interpreter name. The pointer to the interpreter name can simply be made to point to the appropriate argument string. Reviewed by: kib
Diffstat (limited to 'sys/kern/imgact_shell.c')
-rw-r--r--sys/kern/imgact_shell.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/imgact_shell.c b/sys/kern/imgact_shell.c
index 5eb3065..d0ef87c 100644
--- a/sys/kern/imgact_shell.c
+++ b/sys/kern/imgact_shell.c
@@ -240,8 +240,7 @@ exec_shell_imgact(imgp)
imgp->args->stringspace, NULL);
if (error == 0)
- error = copystr(imgp->args->begin_argv, imgp->interpreter_name,
- MAXSHELLCMDLEN, NULL);
+ imgp->interpreter_name = imgp->args->begin_argv;
if (sname != NULL)
sbuf_delete(sname);
OpenPOWER on IntegriCloud