/[hurd]/hurd/serverboot/bootstrap.c
ViewVC logotype

Diff of /hurd/serverboot/bootstrap.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21 by roland, Fri Aug 17 04:48:03 2001 UTC revision 1.22 by roland, Sun Mar 24 01:12:38 2002 UTC
# Line 65  extern void    default_pager(); Line 65  extern void    default_pager();
65  extern void     default_pager_initialize();  extern void     default_pager_initialize();
66  extern void     default_pager_setup();  extern void     default_pager_setup();
67    
 /* initialized in default_pager_initialize */  
 extern mach_port_t default_pager_exception_port;  
 extern mach_port_t default_pager_bootstrap_port;  
   
68  /*  /*
69   * Convert ASCII to integer.   * Convert ASCII to integer.
70   */   */
# Line 153  main(argc, argv) Line 149  main(argc, argv)
149          char    **argv;          char    **argv;
150  {  {
151    int die = 0;    int die = 0;
152    int script_paging_file (const struct cmd *cmd, int linux_signature)    int script_paging_file (const struct cmd *cmd, int *val)
153      {      {
154        if (add_paging_file (bootstrap_master_device_port, cmd->path,        printf ("*** paging files no longer supported in boot scripts ***\n\a"
155                             linux_signature))                "*** use swapon %s and/or /etc/fstab instead ***\n",
156          printf ("(serverboot): %s: Cannot add paging file\n", cmd->path);                cmd->path);
157        return 0;        return 0;
158      }      }
   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);  
     }  
159    int script_serverboot_ctl (const struct cmd *cmd, int *val)    int script_serverboot_ctl (const struct cmd *cmd, int *val)
160      {      {
161        const char *const ctl = cmd->path;        const char *const ctl = cmd->path;
# Line 334  main(argc, argv) Line 318  main(argc, argv)
318                  root_name[len] = 0;                  root_name[len] = 0;
319          }          }
320    
         /*  
          * Set up the default pager.  
          */  
         partition_init();  
   
321          {          {
322            char *cmdline;            char *cmdline;
323    
# Line 352  main(argc, argv) Line 331  main(argc, argv)
331                || boot_script_set_variable ("boot-args", VAL_STR,                || boot_script_set_variable ("boot-args", VAL_STR,
332                                             (int) flag_string)                                             (int) flag_string)
333                || boot_script_define_function ("add-paging-file", VAL_NONE,                || boot_script_define_function ("add-paging-file", VAL_NONE,
334                                                &script_add_paging_file)                                                &script_paging_file)
335                || boot_script_define_function ("add-raw-paging-file", VAL_NONE,                || boot_script_define_function ("add-raw-paging-file", VAL_NONE,
336                                                &script_add_raw_paging_file)                                                &script_paging_file)
337                || boot_script_define_function ("add-linux-paging-file",                || boot_script_define_function ("add-linux-paging-file",
338                                                VAL_NONE,                                                VAL_NONE,
339                                                &script_add_linux_paging_file)                                                &script_paging_file)
340                || boot_script_define_function ("serverboot",                || boot_script_define_function ("serverboot",
341                                                VAL_NONE,                                                VAL_NONE,
342                                                &script_serverboot_ctl)                                                &script_serverboot_ctl)
# Line 382  main(argc, argv) Line 361  main(argc, argv)
361              safe_gets (xx, sizeof xx);              safe_gets (xx, sizeof xx);
362            }            }
363    
         /*  
          * 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);  
   
364          result = boot_script_exec ();          result = boot_script_exec ();
365    
366          if (result)          if (result)
# Line 440  main(argc, argv) Line 403  main(argc, argv)
403          }          }
404  #endif  #endif
405    
406        if (die)          printf ("(serverboot): terminating\n");
407          {          while (1)
408            printf ("(serverboot): terminating, not becoming default pager\n");            task_terminate (mach_task_self ());
           while (1)  
             task_terminate (mach_task_self ());  
         }  
   
       default_pager_initialize (bootstrap_master_host_port);  
   
       /*  
        * Become the default pager  
        */  
       default_pager();  
409        /*NOTREACHED*/        /*NOTREACHED*/
410  }  }
411    

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26