[settings] Allow for autovivification of settings blocks
authorMichael Brown <mcb30@etherboot.org>
Fri, 6 Mar 2009 14:40:44 +0000 (14:40 +0000)
committerMichael Brown <mcb30@etherboot.org>
Fri, 6 Mar 2009 14:40:44 +0000 (14:40 +0000)
commitec24672db720a97305823012033c65f685b41368
treeb6ca3a8b2a5e4668ef49db1ad0484fbbe9addada
parentf95c919741ef4dd344bff2277e227b00d7fe47d8
[settings] Allow for autovivification of settings blocks

Allow for settings blocks to be created on demand.  This allows for
constructions such as

  set defaults/filename http://bootserver/bootfile
  set defaults/priority 0xff
  dhcp net0
  chain ${filename}

which will boot from the DHCP-provided filename, or from
"http://bootserver/bootfile" if the DHCP server does not provide a
filename.

(Note that "priority" gets interpreted as a signed integer, so setting
"defaults/priority" to 0xff will cause the "defaults" settings block
to have an effective priority of -1.)
src/core/settings.c
src/include/gpxe/settings.h