From 273b1e42491dfd89c318b6dae43901f429d2b51e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 20 Aug 2001 22:41:04 +0000 Subject: 2001-08-20 Roland McGrath * 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. --- libdiskfs/opts-std-startup.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'libdiskfs/opts-std-startup.c') 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 + Copyright (C) 1995,96,97,98,99,2001 Free Software Foundation, Inc. + Written by Miles Bader This file is part of the GNU Hurd. @@ -23,11 +22,14 @@ #include #include #include +#include #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; -- cgit v1.2.3