diff options
author | Roland McGrath <roland@gnu.org> | 1998-12-27 08:46:43 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1998-12-27 08:46:43 +0000 |
commit | 93e065eec1c02dd21f4a7deeae87bc666a5b40c5 (patch) | |
tree | 2c29673001dee30e2a33553bd1bcf524dcb13a66 /boot | |
parent | 0963bb2666aec71005e2bd82c8eb77c045269691 (diff) |
1998-12-26 Roland McGrath <roland@baalperazim.frob.com>
* boot.c (isig): New variable.
(init_termstate): If it's set, set ISIG flag in c_lflag.
(options): New option -I/--isig.
(parse_opt): Make -I set `isig'.
(boot_script_exec_cmd): Print out args as well as file name.
Diffstat (limited to 'boot')
-rw-r--r-- | boot/boot.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/boot/boot.c b/boot/boot.c index 7ed6804e..3bb5bc03 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -1,6 +1,6 @@ /* Load a task using the single server, and then run it as if we were the kernel. - Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1993, 94, 95, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -73,6 +73,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <hurd.h> static struct termios orig_tty_state; +static int isig; static void init_termstate () @@ -84,6 +85,8 @@ init_termstate () orig_tty_state = tty_state; cfmakeraw (&tty_state); + if (isig) + tty_state.c_lflag |= ISIG; if (tcsetattr (0, 0, &tty_state) < 0) error (11, errno, "tcsetattr"); @@ -354,6 +357,11 @@ boot_script_exec_cmd (mach_port_t task, char *path, int argc, struct i386_thread_state regs; write (2, path, strlen (path)); + for (i = 1; i < argc; ++i) + { + write (2, " ", 1); + write (2, argv[i], strlen (argv[i])); + } write (2, "\r\n", 2); startpc = load_image (task, path); @@ -400,6 +408,8 @@ static struct argp_option options[] = "Boot in single user mode" }, { "pause" , 'd', 0, 0, "Pause for user confirmation at various times during booting" }, + { "isig", 'I', 0, 0, + "Do not disable terminal signals, so you can suspend and interrupt boot."}, { 0 } }; static char args_doc[] = "BOOT-SCRIPT"; @@ -414,6 +424,8 @@ parse_opt (int key, char *arg, struct argp_state *state) case 'D': useropen_dir = arg; break; + case 'I': isig = 1; break; + case 's': case 'd': len = strlen (bootstrap_args); if (len >= sizeof bootstrap_args - 1) |