summaryrefslogtreecommitdiff
path: root/libdiskfs/console.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1998-12-27 08:41:15 +0000
committerRoland McGrath <roland@gnu.org>1998-12-27 08:41:15 +0000
commitacb030991c07ad33a8d55ff19e493cc26a3ea6a6 (patch)
tree68312059ccd49b5c42927d19825bba3d90e48fd9 /libdiskfs/console.c
parent2c026d41553528d0fdb0fe795b99ddd6c5e68b74 (diff)
1998-12-27 Roland McGrath <roland@baalperazim.frob.com>
* opts-std-startup.c (startup_options): Move -C above "Boot options:", give it a docstring. Docstrings for --bootflags, --boot-command. (_diskfs_boot_command): New variable. (startup_options, parse_startup_opt): New option --boot-command, consumes remaining args to set _diskfs_boot_command. * priv.h: Declare _diskfs_boot_command. * boot-start.c (diskfs_start_bootstrap): If diskfs_exec_server_task is null, assume we are running as the boot command and have a root with /servers/exec. If _diskfs_boot_command is set, start that command in place of init. If can't lookup initname, print error msg and loop to prompt. Put a newline before "Init name" prompt. After starting exec server, try to set active trans on /servers/exec. (diskfs_boot_getpriv): New function: if _hurd_host_priv is null, use fsys_getpriv on our bootstrap port. (parent_task): New static variable, set there with fsys_getpriv call. (diskfs_S_fsys_init): If diskfs_exec_server_task is null, don't do anything with it; instead register parent_task as our child and send an fsys_init to our parent on our bootstrap port. * console.c (diskfs_console_stdio): Call diskfs_boot_privports before get_privileged_ports if diskfs_boot_flags is set.
Diffstat (limited to 'libdiskfs/console.c')
-rw-r--r--libdiskfs/console.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libdiskfs/console.c b/libdiskfs/console.c
index 885f527e..8271b799 100644
--- a/libdiskfs/console.c
+++ b/libdiskfs/console.c
@@ -1,6 +1,6 @@
/* Redirect stdio to the console if possible
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 96, 98 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -31,6 +31,8 @@
#include <device/device.h>
#include <hurd.h>
+#include "priv.h"
+
/* Make errors go somewhere reasonable. */
void
diskfs_console_stdio ()
@@ -49,6 +51,8 @@ diskfs_console_stdio ()
{
mach_port_t dev, cons;
error_t err;
+ if (diskfs_boot_flags)
+ diskfs_boot_privports ();
err = get_privileged_ports (NULL, &dev);
assert_perror (err);
err = device_open (dev, D_READ|D_WRITE, "console", &cons);