summaryrefslogtreecommitdiff
path: root/libdiskfs/opts-std-startup.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-08-20 22:41:04 +0000
committerRoland McGrath <roland@gnu.org>2001-08-20 22:41:04 +0000
commit273b1e42491dfd89c318b6dae43901f429d2b51e (patch)
tree66c63695f3d5a1b3ed7d71fd6cf8ae73e6bd1514 /libdiskfs/opts-std-startup.c
parent4f6088c3e71b4f602bc4a351d168525018f1241d (diff)
2001-08-20 Roland McGrath <roland@frob.com>
* opts-std-startup.c: diskfs_boot_flags -> diskfs_boot_command_line. (OPT_BOOT_CMDLINE): Renamed from OPT_BOOTFLAGS. (startup_options): --bootflags -> --multiboot-command-line (parse_startup_opt): Parse it. * diskfs.h: diskfs_boot_flags -> diskfs_boot_command_line. (diskfs_boot_filesystem): New macro. * init-main.c (diskfs_init_main): Use it. * init-init.c (diskfs_init_diskfs): Likewise. * console.c (diskfs_console_stdio): Likewise. * boot-start.c (_diskfs_boot_privports): Likewise. (diskfs_start_bootstrap): Split boot_command_line into words and pass those arguments to init instead of diskfs_bootflags. * opts-std-startup.c (_diskfs_boot_pause): New variable. (OPT_BOOT_PAUSE): New macro. (startup_options): Add --boot-debug-pause. (parse_startup_opt): Parse it. * boot-start.c (diskfs_boot_init_program): New variable. * diskfs.h: Declare it. * boot-start.c (default_init): Variable removed. (diskfs_start_bootstrap): Use diskfs_boot_init_program instead of default_init or prompting under -i. * opts-std-startup.c (OPT_BOOT_INIT_PROGRAM): New macro. (startup_options): Add --boot-init-program. (parse_startup_opt): Parse it.
Diffstat (limited to 'libdiskfs/opts-std-startup.c')
-rw-r--r--libdiskfs/opts-std-startup.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/libdiskfs/opts-std-startup.c b/libdiskfs/opts-std-startup.c
index 9d0c1d90..6b462cd7 100644
--- a/libdiskfs/opts-std-startup.c
+++ b/libdiskfs/opts-std-startup.c
@@ -1,8 +1,7 @@
/* Standard startup-time command line parser
- Copyright (C) 1995, 96, 97, 98, 99 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ Copyright (C) 1995,96,97,98,99,2001 Free Software Foundation, Inc.
+ Written by Miles Bader <miles@gnu.org>
This file is part of the GNU Hurd.
@@ -23,11 +22,14 @@
#include <stdio.h>
#include <argp.h>
#include <hurd/store.h>
+#include <hurd/paths.h>
#include "priv.h"
-char *diskfs_boot_flags;
+const char *diskfs_boot_command_line;
char **_diskfs_boot_command;
+int _diskfs_boot_pause;
+
extern char **diskfs_argv;
mach_port_t diskfs_exec_server_task = MACH_PORT_NULL;
@@ -37,8 +39,10 @@ mach_port_t diskfs_exec_server_task = MACH_PORT_NULL;
#define OPT_HOST_PRIV_PORT (-1)
#define OPT_DEVICE_MASTER_PORT (-2)
#define OPT_EXEC_SERVER_TASK (-3)
-#define OPT_BOOTFLAGS (-4)
+#define OPT_BOOT_CMDLINE (-4)
#define OPT_BOOT_COMMAND (-5)
+#define OPT_BOOT_INIT_PROGRAM (-6)
+#define OPT_BOOT_PAUSE (-7)
static const struct argp_option
startup_options[] =
@@ -49,9 +53,12 @@ startup_options[] =
{"chroot", 0, 0, OPTION_ALIAS},
{0,0,0,0, "Boot options:", -2},
- {"bootflags", OPT_BOOTFLAGS, "FLAGS", 0,
- "Required for bootstrap filesystem, the FLAGS"
- " argument is passed on to init"},
+ {"multiboot-command-line", OPT_BOOT_CMDLINE, "ARGS", 0,
+ "Required for bootstrap filesystem, the multiboot kernel command line"},
+ {"boot-init-program", OPT_BOOT_INIT_PROGRAM, "FILE", 0,
+ "For bootstrap filesystem, init program to run (default " _HURD_INIT ")"},
+ {"boot-debug-pause", OPT_BOOT_PAUSE, 0, 0,
+ "Pause for keystroke before starting bootstrap programs"},
{"boot-command", OPT_BOOT_COMMAND, 0, 0,
"Remaining arguments form command line to run"
" at bootstrap instead of init"},
@@ -94,8 +101,12 @@ parse_startup_opt (int opt, char *arg, struct argp_state *state)
_hurd_host_priv = atoi (arg); break;
case OPT_EXEC_SERVER_TASK:
diskfs_exec_server_task = atoi (arg); break;
- case OPT_BOOTFLAGS:
- diskfs_boot_flags = arg; break;
+ case OPT_BOOT_CMDLINE:
+ diskfs_boot_command_line = arg; break;
+ case OPT_BOOT_INIT_PROGRAM:
+ diskfs_boot_init_program = arg; break;
+ case OPT_BOOT_PAUSE:
+ _diskfs_boot_pause = 1;
case 'C':
_diskfs_chroot_directory = arg; break;