Page MenuHomeFreeBSD

Prevent loader.conf load failure due to unknown console entries
ClosedPublic

Authored by smh on Jan 21 2016, 2:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 7:50 PM
Unknown Object (File)
Dec 22 2023, 9:33 PM
Unknown Object (File)
Sep 16 2023, 9:31 AM
Unknown Object (File)
Sep 13 2023, 9:09 AM
Unknown Object (File)
Aug 31 2023, 9:32 PM
Unknown Object (File)
Aug 30 2023, 9:15 AM
Unknown Object (File)
Jul 10 2023, 7:57 PM
Unknown Object (File)
Jul 9 2023, 1:30 PM

Details

Summary

When processing loader.conf if console contained an entry for an unsupported console then cons_set would return an error refusing to set any console.

This has two side effects:

  1. Forth would throw a syntax error and stop processing loader.conf at that point.
  2. The value of console is ignored.

#1 Means other important loader.conf entries may not be processed, which is clearly undesirable.
#2 Means the users preference for console aren't applied even if they did contain valid options. Now we have support for multi boot paths from a single image e.g. bios and efi mode the console preference needs to deal with the need to set preference for more than one souce.

Fix this by:

  1. Returning CMD_OK where possible from cons_set.
  2. Allowing set with at least one valid console to proceed.
Test Plan

Check the procesing of console var in loader.conf for:

  1. All valid entries = no error, console set
  2. At least one valid entry = warning about invalid entry, console set
  3. No valid entries = warning about no valid consoles

In all cases the entire of loader.conf should be processed.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

smh retitled this revision from to Prevent loader.conf load failure due to unknown console entries.
smh updated this object.
smh edited the test plan for this revision. (Show Details)

Remove unused changes from bootstrap.h

allanjude added a reviewer: allanjude.
allanjude added a subscriber: allanjude.

seems like a reasonable solution to me

This revision is now accepted and ready to land.Jan 21 2016, 3:13 PM
This revision was automatically updated to reflect the committed changes.