[settings] Add the uristring setting type
authorMichael Brown <mcb30@etherboot.org>
Wed, 24 Sep 2008 06:22:42 +0000 (07:22 +0100)
committerMichael Brown <mcb30@etherboot.org>
Wed, 24 Sep 2008 06:22:42 +0000 (07:22 +0100)
commit35b7658877967e0f0a647a53e3b11497268efbb5
treebff2e0fd2a364b6304b4342fe43e9841f4fc3c0e
parentb350b10b35760be54d216ef06f8608be05728033
[settings] Add the uristring setting type

This allows settings to be expanded in a way that is safe to include
within a URI string, such as

  kernel http://10.0.0.1/boot.php?mf=${manufacturer:uristring}

where the ${manufacturer} setting may contain characters that are not
permitted (or have reserved purposes) within a URI.

Since whitespace characters will be URI-encoded (e.g. "%20" for a
space character), this also works around the problem that spaces
within an expanded setting would cause the shell to split command-line
arguments incorrectly.
src/core/settings.c