From ceae83bd25aadee094ec9d3a95cf27510cea2037 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Sun, 7 Aug 2016 15:16:57 +0200 Subject: proc: Fix references to the startup server. * proc/main.c: Fix references to the startup server in code and comments. * proc/mgt.c: Likewise. * proc/msg.c: Likewise. * proc/proc.h: Likewise. --- proc/main.c | 5 ++--- proc/mgt.c | 4 ++-- proc/msg.c | 10 +++++----- proc/proc.h | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) (limited to 'proc') diff --git a/proc/main.c b/proc/main.c index f78b2af2..c4936f68 100644 --- a/proc/main.c +++ b/proc/main.c @@ -111,7 +111,7 @@ main (int argc, char **argv, char **envp) err = task_get_bootstrap_port (mach_task_self (), &boot); assert_perror (err); if (boot == MACH_PORT_NULL) - error (2, 0, "proc server can only be run by init during boot"); + error (2, 0, "proc server can only be run by startup during boot"); proc_bucket = ports_create_bucket (); proc_class = ports_create_class (0, 0); @@ -124,7 +124,7 @@ main (int argc, char **argv, char **envp) /* Create the initial proc object for init (PID 1). */ init_proc = create_init_proc (); - /* Create the startup proc object for /hurd/init (PID 2). */ + /* Create the startup proc object for /hurd/startup (PID 2). */ startup_proc = allocate_proc (MACH_PORT_NULL); startup_proc->p_deadmsg = 1; complete_proc (startup_proc, HURD_PID_STARTUP); @@ -168,7 +168,6 @@ main (int argc, char **argv, char **envp) /* Get our stderr set up to print on the console, in case we have to panic or something. */ mach_port_t cons; - error_t err; err = device_open (_hurd_device_master, D_READ|D_WRITE, "console", &cons); assert_perror (err); stdin = mach_open_devstream (cons, "r"); diff --git a/proc/mgt.c b/proc/mgt.c index 128a1c8b..48a252e1 100644 --- a/proc/mgt.c +++ b/proc/mgt.c @@ -994,8 +994,8 @@ S_proc_mark_important (struct proc *p) exempt from this restriction, as startup_proc calls this on their behalf. The kernel process is a notable example of an process that needs this exemption. That is not an problem however, since - all children of /hurd/init are important and we mark them as such - anyway. */ + all children of /hurd/startup are important and we mark them as + such anyway. */ if (! check_uid (p, 0) && ! check_owner (startup_proc, p)) return EPERM; diff --git a/proc/msg.c b/proc/msg.c index c7bab99e..1f132cd0 100644 --- a/proc/msg.c +++ b/proc/msg.c @@ -35,11 +35,11 @@ check_message_return (struct proc *p, void *availpaddr) } } -/* Register ourselves with init. */ +/* Register ourselves with statup. */ static void * -tickle_init (void *initport) +tickle_statup (void *statupport) { - startup_essential_task ((mach_port_t) initport, mach_task_self (), + startup_essential_task ((mach_port_t) statupport, mach_task_self (), MACH_PORT_NULL, "proc", _hurd_host_priv); return NULL; } @@ -65,11 +65,11 @@ S_proc_setmsgport (struct proc *p, if (p == startup_proc && startup_fallback) { - /* Init is single threaded, so we can't delay our reply for + /* Statup is single threaded, so we can't delay our reply for the essential task RPC; spawn a thread to do it. */ pthread_t thread; error_t err; - err = pthread_create (&thread, NULL, tickle_init, + err = pthread_create (&thread, NULL, tickle_statup, (void*) (uintptr_t) msgport); if (!err) pthread_detach (thread); diff --git a/proc/proc.h b/proc/proc.h index 4be1de4e..2c08fd13 100644 --- a/proc/proc.h +++ b/proc/proc.h @@ -140,7 +140,7 @@ struct exc mach_port_t authserver; struct proc *self_proc; /* process HURD_PID_PROC (us) */ struct proc *init_proc; /* process 1 (sysvinit) */ -struct proc *startup_proc; /* process 2 (hurd/init) */ +struct proc *startup_proc; /* process 2 (hurd/startup) */ struct port_bucket *proc_bucket; struct port_class *proc_class; -- cgit v1.2.3