Rename Magenta to Zircon
Change-Id: I1a78823670bd7560f223489989c8fe8eea290ad9
diff --git a/run-command.c b/run-command.c
index 94c86fe..ce93357 100644
--- a/run-command.c
+++ b/run-command.c
@@ -7,7 +7,7 @@
#include "strbuf.h"
#ifdef __Fuchsia__
-#include <magenta/syscalls.h>
+#include <zircon/syscalls.h>
#endif
void child_process_init(struct child_process *child)
@@ -34,19 +34,19 @@
static proc_t waitproc(proc_t proc, int* status, int options)
{
#if defined(__Fuchsia__)
- mx_status_t st = mx_object_wait_one(proc,
- MX_PROCESS_TERMINATED,
- MX_TIME_INFINITE,
+ zx_status_t st = zx_object_wait_one(proc,
+ ZX_PROCESS_TERMINATED,
+ ZX_TIME_INFINITE,
NULL);
- if (st != MX_OK) {
+ if (st != ZX_OK) {
fprintf(stderr, "Could not wait on proc: %d\n", st);
return -1;
}
- mx_info_process_t proc_info;
- st = mx_object_get_info(proc, MX_INFO_PROCESS,
+ zx_info_process_t proc_info;
+ st = zx_object_get_info(proc, ZX_INFO_PROCESS,
&proc_info, sizeof(proc_info),
NULL, NULL);
- if (st != MX_OK) {
+ if (st != ZX_OK) {
fprintf(stderr, "Could not get info for proc: %d\n", st);
return -1;
}
@@ -539,7 +539,7 @@
if (cmd->dir) {
chdir(cmd->dir);
}
- launchpad_clone(lp, LP_CLONE_MXIO_CWD);
+ launchpad_clone(lp, LP_CLONE_FDIO_CWD);
if (cmd->dir) {
chdir(cwd_buf);
}
@@ -550,7 +550,7 @@
cmd->env = cmd->env_array.argv;
launchpad_set_environ(lp, cmd->env);
- launchpad_clone(lp, LP_CLONE_MXIO_NAMESPACE | LP_CLONE_DEFAULT_JOB);
+ launchpad_clone(lp, LP_CLONE_FDIO_NAMESPACE | LP_CLONE_DEFAULT_JOB);
if (cmd->no_stdin)
; //fhin = open("/dev/null", O_RDWR);
@@ -584,15 +584,15 @@
launchpad_clone_fd(lp, cmd->out, 1);
//fhout = dup(cmd->out);
- mx_handle_t proc;
+ zx_handle_t proc;
const char* errmsg;
- mx_status_t status = launchpad_go(lp, &proc, &errmsg);
+ zx_status_t status = launchpad_go(lp, &proc, &errmsg);
if (status < 0) {
fprintf(stderr, "failed to create child: %s: %d\n", errmsg, status);
failed_errno = EINVAL;
}
cmd->pid = proc;
- if (cmd->clean_on_exit && cmd->pid != MX_HANDLE_INVALID)
+ if (cmd->clean_on_exit && cmd->pid != ZX_HANDLE_INVALID)
mark_child_for_cleanup(cmd->pid, cmd);
diff --git a/run-command.h b/run-command.h
index e7ef3c8..1acb558 100644
--- a/run-command.h
+++ b/run-command.h
@@ -12,7 +12,7 @@
#include "argv-array.h"
#if defined(__Fuchsia__)
-#define proc_t mx_handle_t
+#define proc_t zx_handle_t
#else
#define proc_t pid_t
#endif