anchor.diff:  
   %%% -------------------------------------------------
   %%% Stop the system. 
  -%%% Reason is: restart | reboot | stop
  +%%% Reason is: restart | {restart, Mode} | reboot | stop
   %%% According to reason terminate emulator or restart
   %%% system using the same init process again.
   %%% -------------------------------------------------
  
positive.code:     State;
  new_kernelpid({Name,What},BootPid,State) ->
      erlang:display({"could not start kernel pid",Name,What}),
      clear_system(BootPid,State),
      crash("could not start kernel pid", [Name, What]).
  
  %% Here is the main loop after the system has booted.
  
negative.code:     erl_init:restart(),
      boot(Start,Flags,Args).
  
  clear_system(Unload,BootPid,State) ->
      Heart = get_heart(State#state.kernel),
      Logger = get_logger(State#state.kernel),
      shutdown_pids(Heart,Logger,BootPid,State),
      Unload andalso unload(Heart),
      kill_em([Logger]),
      do_unload([logger_server]).
  
  