summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-05-27 13:45:09 +0000
committerRoland McGrath <roland@gnu.org>1994-05-27 13:45:09 +0000
commita1c12f2b23093f904b2f4e1bfdb6bbf2f0eef310 (patch)
tree590e8d73d5fc8989653bfe8f199e6bb00d20917e /libdiskfs
parenta41fd7fa9bc922ec969ea1422712ae7af3cce496 (diff)
Formerly boot-start.c.~23~
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/boot-start.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
index 41bbf3c1..45d7dbfa 100644
--- a/libdiskfs/boot-start.c
+++ b/libdiskfs/boot-start.c
@@ -176,7 +176,7 @@ diskfs_S_exec_startup (mach_port_t port,
mach_port_t rootport;
device_t con;
struct ufsport *upt;
- char exec_argv[] = "[BOOT EXECSERVER]\0";
+ char exec_argv[] = "[BOOT EXECSERVER]";
if (!(upt = ports_check_port_type (port, PT_EXECBOOT)))
return EOPNOTSUPP;
@@ -186,8 +186,11 @@ diskfs_S_exec_startup (mach_port_t port,
*flags = 0;
- *argvP = exec_argv;
- *argvlen = sizeof (exec_argv) + 1;
+ if (*argvlen < sizeof (exec_argv))
+ vm_allocate (mach_task_self (),
+ (vm_address_t *) argvP, sizeof (exec_argv), 1);
+ bcopy (exec_argv, *argvP, sizeof (exec_argv));
+ *argvlen = sizeof (exec_argv);
*envplen = 0;