Skip to content

Commit f794777

Browse files
ecm-pushbxPerditionC
authored andcommitted
config: only overwrite skip config prompt if it was displayed
This allows to boot with SWITCHES=/F without any lone CRs.
1 parent 314c8b6 commit f794777

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

kernel/config.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,14 +1085,15 @@ STATIC BOOL SkipLine(char *pLine)
10851085
{
10861086
short key;
10871087
COUNT i;
1088+
signed char originalskipconfigseconds = InitKernelConfig.SkipConfigSeconds;
10881089

1089-
if (InitKernelConfig.SkipConfigSeconds >= 0)
1090+
if (originalskipconfigseconds >= 0)
10901091
{
10911092

1092-
if (InitKernelConfig.SkipConfigSeconds > 0)
1093+
if (originalskipconfigseconds > 0)
10931094
printf("Press F8 to trace or F5 to skip CONFIG.SYS/AUTOEXEC.BAT");
10941095

1095-
key = GetBiosKey(InitKernelConfig.SkipConfigSeconds); /* wait 2 seconds */
1096+
key = GetBiosKey(originalskipconfigseconds); /* wait 2 seconds */
10961097

10971098
InitKernelConfig.SkipConfigSeconds = -1;
10981099

@@ -1105,7 +1106,8 @@ STATIC BOOL SkipLine(char *pLine)
11051106
singleStep = TRUE;
11061107
}
11071108

1108-
printf("\r%79s\r", ""); /* clear line */
1109+
if (originalskipconfigseconds > 0)
1110+
printf("\r%79s\r", ""); /* clear line */
11091111

11101112
if (SkipAllConfig)
11111113
printf("Skipping CONFIG.SYS/AUTOEXEC.BAT\n");

0 commit comments

Comments
 (0)