HomeFreeBSD

Improve boot loader quote parsing

Description

Improve boot loader quote parsing

parse() is the boot loader's interp_parse.c is too naive about quotes

both single and double quotes were allowed to be mixed, and single
quotes did not follow the usual semantics (re variable expansion).

The old code did not check for terminating quotes

This update implements:

  • distinguishing single and double quote
  • variable expansion will not be done inside single quote protected area
  • will preserve inner quote for values like "value 'some list'"
  • ending quote check.

this diff does not implement ending quote order check, it shouldn't
be too hard, needs some improvements on parser state machine.

PR: 204602
Submitted by: Toomas Soome <tsoome@me.com>
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D6000