NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-i386/53128: Boot says "default boot twice, skipping..."



The following reply was made to PR port-i386/53128; it has been noted by GNATS.

From: Andreas Gustafsson <gson%gson.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: coypu%sdf.org@localhost
Subject: Re: port-i386/53128: Boot says "default boot twice, skipping..."
Date: Mon, 19 Aug 2019 12:14:06 +0300

 The reason we get the "default boot twice, skipping..." message is
 that the bootloader tries to invoke the default recursively (!).
 Specifically, it executes the following chain of mutually recursive
 function calls (note that each function appears twice):
 
   docommandchoice(0) ->
     docommand("boot") ->
       command_boot("") ->
         bootdefault() ->
           docommandchoice(0) ->
             docommand("boot") ->
               command_boot("") ->
                 bootdefault()
 
 At that point, bootdefault() notices it has been reentered, prints the
 message "default boot twice, skipping..." and returns, thereby
 averting infinite recursion.  We end up back in command_boot(), which
 then executes the loop
 
                 for (i = 0; i < NUMNAMES; i++) {
                         bootit(names[i][0], howto);
                         bootit(names[i][1], howto);
                 }
   
 and the actual boot happens there.
 
 Clearly having the boot default defined recursively in terms of itself
 doesn't make sense, but I'm not sure what the correct behavior is - is
 it specified anywhere?
 -- 
 Andreas Gustafsson, gson%gson.org@localhost
 


Home | Main Index | Thread Index | Old Index