summaryrefslogtreecommitdiff
path: root/init/init.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-06-13 21:27:50 +0000
committerRoland McGrath <roland@gnu.org>1999-06-13 21:27:50 +0000
commitaabffc4d55071adae23121938a7d2a3419d5845a (patch)
tree3febf3b4e6a4cc8d9d92ceea1e5165fb2b72d14e /init/init.c
parentd7e61c508b5fe1933884d31b91b26e2fe81202cb (diff)
1999-06-13 Roland McGrath <roland@baalperazim.frob.com>
* init.c (run): Add const to SERVER arg, PROG local. Don't trim directory name from PROG for argument.
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/init/init.c b/init/init.c
index b344ad40..0b099cd5 100644
--- a/init/init.c
+++ b/init/init.c
@@ -332,10 +332,10 @@ request_dead_name (mach_port_t name)
/* Run SERVER, giving it INIT_PORT_MAX initial ports from PORTS.
Set TASK to be the task port of the new image. */
void
-run (char *server, mach_port_t *ports, task_t *task)
+run (const char *server, mach_port_t *ports, task_t *task)
{
char buf[BUFSIZ];
- char *prog = server;
+ const char *prog = server;
if (bootstrap_args & RB_INITNAME)
{
@@ -353,20 +353,14 @@ run (char *server, mach_port_t *ports, task_t *task)
error (0, errno, "%s", prog);
else
{
- char *progname;
task_create (mach_task_self (), 0, task);
if (bootstrap_args & RB_KDB)
{
printf ("Pausing for %s\n", prog);
getchar ();
}
- progname = strrchr (prog, '/');
- if (progname)
- ++progname;
- else
- progname = prog;
errno = file_exec (file, *task, 0,
- progname, strlen (progname) + 1, /* Args. */
+ (char *)prog, strlen (prog) + 1, /* Args. */
"", 1, /* No env. */
default_dtable, MACH_MSG_TYPE_COPY_SEND, 3,
ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,