summaryrefslogtreecommitdiff
path: root/serverboot/bootstrap.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-03-24 01:12:38 +0000
committerRoland McGrath <roland@gnu.org>2002-03-24 01:12:38 +0000
commitd2b6eb374ad28580b1014986920c95c91a60f2a7 (patch)
tree09aea9d06a9dd817166d815d1c93bb709ed34418 /serverboot/bootstrap.c
parent267bd5c3ac1790e331aee4f73503f38e8df52f8c (diff)
2002-03-23 Roland McGrath <roland@frob.com>
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.
Diffstat (limited to 'serverboot/bootstrap.c')
-rw-r--r--serverboot/bootstrap.c67
1 files changed, 10 insertions, 57 deletions
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*/
}