mcb_walk.c: try querying UMB link state even if not on DOS 5+ #161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current lMS-DOS still reports its version as v4.00 but does fully support a DOS-managed UMA. As of today lMS-DOS also supports the SHELLHIGH= directive. Like FreeDOS's this is implemented using the 21.4B80 extension. Although the internals differ, the outside observable behaviour is the DOS executable loader allocates both the environment and the process memory block into the UMA, if there are free UMBs. However, unlike LH the UMB link state is not enabled once the control flow is passed to the application. That means an environment block in a UMB isn't reachable when walking the MCBs without regard to proceeding past the first UMCB.
The MCB walker is used in FreeCOM's init to validate the environment block passed to it upon its startup. Reference:
freecom/shell/init.c
Line 238 in cede733
If this check fails, then the shell will prompt for the position of its executable as follows. This patch makes the MCB walker enable the UMB link even if the reported DOS version is below 5, allowing it to find the environment block's UMCB and avoiding the prompt.