Settle is a program, and a machine with no fallback still starts
The boot state opened a loop that could not be closed from inside: the machine said "settle it to try again" and gave you no way to do so. Settle closes it, in 349 bytes. A PROGRAM RATHER THAN A SHELL WORD. The shell is for the things that cannot be done without it, and this is not one - it reaches the system through SWI like anything else, which means it can be replaced, left off a disk, or called by whatever comes to call programs in turn. That last one is the point: a shell word is not callable by anything. Two services for it. osBootState answers in Q, and a machine with no disk answers settled, because there is nothing there to be unsettled about. osBootSettle puts it back. SETTLING IS THE ONLY WRITE A PROGRAM GETS - marking a start as trying or fallen back is the loader's business, and a service that let a program claim either would let it lie about something the loader has no way to check. And a hole the tests walked into, which was mine rather than theirs. With no fallback configured, a failed start left the machine unable to start at all: the mark said do not use the system, and there was nothing else to use. That turns "the last start failed" into "no start is permitted", which is worse than the problem the mark was added to solve. With nothing to fall back to it now tries the configuration again and says so - a failure that was passing recovers, and one that is not leaves the machine exactly where it would have been without any of this, which is the most that can be promised when there is only one thing to start. docs.sh caught both new services having no row in the services table before anything else did.
This commit is contained in:
@@ -154,11 +154,26 @@ stateSettled:
|
||||
useFallback:
|
||||
SETD.0 HaveFallback
|
||||
LDA.0
|
||||
BRA noSystem
|
||||
BRA noFallbackTryAgain
|
||||
SETD.0 FallbackName
|
||||
RCAL tryImage
|
||||
BRI noSystem
|
||||
|
||||
noFallbackTryAgain:
|
||||
; NOTHING TO FALL BACK TO, so try what was asked for anyway rather than stopping. With no
|
||||
; second name the mark is the only thing standing between the machine and its own
|
||||
; configuration, and refusing on the strength of it would turn "the last start failed"
|
||||
; into "no start is permitted", which is worse than the problem it was added to solve.
|
||||
;
|
||||
; A failure that was passing recovers here. One that is not leaves the machine exactly
|
||||
; where it would have been without any of this, which is the most that can be promised
|
||||
; when there is only one thing to start.
|
||||
SETD.0 NoFallbackText
|
||||
RCAL say
|
||||
SETD.0 BootName
|
||||
RCAL tryImage
|
||||
BRI noSystem
|
||||
|
||||
; ---- Starting one particular image ----
|
||||
;
|
||||
; DP0 names it. Returns only if it could not be started, having said why; everything that
|
||||
@@ -549,6 +564,9 @@ DidNotArriveText:
|
||||
StillBackText:
|
||||
"still on the fallback: settle it to try again
|
||||
"
|
||||
NoFallbackText:
|
||||
"no fallback, so trying it again
|
||||
"
|
||||
NothingText:
|
||||
"nothing to start
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user