From d2b6eb374ad28580b1014986920c95c91a60f2a7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 24 Mar 2002 01:12:38 +0000 Subject: 2002-03-23 Roland McGrath Excised default pager functionality from serverboot. * Makefile (SRCS): Move def_pager_setup.c default_pager.c kalloc.c to (EXTRA_DIST): ... here. (OBJS): Remove *Server.o from here. (MIGSFLAGS): Variable removed. * bootstrap.c (main): Replace paging-file boot-script functions with a stub that prints an error. No longer call partition_init, default_pager_initialize, or default_pager. (default_pager_bootstrap_port): Variable removed. (main): Don't use it. (default_pager_exception_port): Declaration removed. (main): Don't use it. * default_pager.c (default_pager_bootstrap_port): Variable removed. (default_pager_demux_default): Don't use it. (default_pager_initialize): Likewise. (default_pager): Likewise. (do_bootstrap_privileged_ports, bootstrap_compat): Functions removed. [mips] (set_ras_address): Likewise. --- serverboot/bootstrap.c | 67 ++++++++------------------------------------------ 1 file changed, 10 insertions(+), 57 deletions(-) (limited to 'serverboot/bootstrap.c') diff --git a/serverboot/bootstrap.c b/serverboot/bootstrap.c index 3d298a5a..0b8b25a1 100644 --- a/serverboot/bootstrap.c +++ b/serverboot/bootstrap.c @@ -65,10 +65,6 @@ extern void default_pager(); extern void default_pager_initialize(); extern void default_pager_setup(); -/* initialized in default_pager_initialize */ -extern mach_port_t default_pager_exception_port; -extern mach_port_t default_pager_bootstrap_port; - /* * Convert ASCII to integer. */ @@ -153,25 +149,13 @@ main(argc, argv) char **argv; { int die = 0; - int script_paging_file (const struct cmd *cmd, int linux_signature) + int script_paging_file (const struct cmd *cmd, int *val) { - if (add_paging_file (bootstrap_master_device_port, cmd->path, - linux_signature)) - printf ("(serverboot): %s: Cannot add paging file\n", cmd->path); + printf ("*** paging files no longer supported in boot scripts ***\n\a" + "*** use swapon %s and/or /etc/fstab instead ***\n", + cmd->path); return 0; } - int script_add_paging_file (const struct cmd *cmd, int *val) - { - return script_paging_file (cmd, 0); - } - int script_add_raw_paging_file (const struct cmd *cmd, int *val) - { - return script_paging_file (cmd, -1); - } - int script_add_linux_paging_file (const struct cmd *cmd, int *val) - { - return script_paging_file (cmd, 1); - } int script_serverboot_ctl (const struct cmd *cmd, int *val) { const char *const ctl = cmd->path; @@ -334,11 +318,6 @@ main(argc, argv) root_name[len] = 0; } - /* - * Set up the default pager. - */ - partition_init(); - { char *cmdline; @@ -352,12 +331,12 @@ main(argc, argv) || boot_script_set_variable ("boot-args", VAL_STR, (int) flag_string) || boot_script_define_function ("add-paging-file", VAL_NONE, - &script_add_paging_file) + &script_paging_file) || boot_script_define_function ("add-raw-paging-file", VAL_NONE, - &script_add_raw_paging_file) + &script_paging_file) || boot_script_define_function ("add-linux-paging-file", VAL_NONE, - &script_add_linux_paging_file) + &script_paging_file) || boot_script_define_function ("serverboot", VAL_NONE, &script_serverboot_ctl) @@ -382,22 +361,6 @@ main(argc, argv) safe_gets (xx, sizeof xx); } - /* - * task_set_exception_port and task_set_bootstrap_port - * both require a send right. - */ - (void) mach_port_insert_right(my_task, default_pager_bootstrap_port, - default_pager_bootstrap_port, - MACH_MSG_TYPE_MAKE_SEND); - (void) mach_port_insert_right(my_task, default_pager_exception_port, - default_pager_exception_port, - MACH_MSG_TYPE_MAKE_SEND); - - /* - * Change our exception port. - */ - (void) task_set_exception_port(my_task, default_pager_exception_port); - result = boot_script_exec (); if (result) @@ -440,19 +403,9 @@ main(argc, argv) } #endif - if (die) - { - printf ("(serverboot): terminating, not becoming default pager\n"); - while (1) - task_terminate (mach_task_self ()); - } - - default_pager_initialize (bootstrap_master_host_port); - - /* - * Become the default pager - */ - default_pager(); + printf ("(serverboot): terminating\n"); + while (1) + task_terminate (mach_task_self ()); /*NOTREACHED*/ } -- cgit v1.2.3