diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-06-13 17:58:58 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-06-13 17:58:58 -0500 |
commit | efe16d2b85fd7efc546f840dd380f382f5865622 (patch) | |
tree | 90bad38edb4e02cc219dd01f5ec0314cb57ac3ca /hscript/script_i.hh | |
parent | 92b34f42dd998ba6e852e85089b642a20d5e9d80 (diff) | |
download | horizon-efe16d2b85fd7efc546f840dd380f382f5865622.tar.gz horizon-efe16d2b85fd7efc546f840dd380f382f5865622.tar.bz2 horizon-efe16d2b85fd7efc546f840dd380f382f5865622.tar.xz horizon-efe16d2b85fd7efc546f840dd380f382f5865622.zip |
hscript: Stub unfinished implementation of 'bootloader' key
Diffstat (limited to 'hscript/script_i.hh')
-rw-r--r-- | hscript/script_i.hh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/hscript/script_i.hh b/hscript/script_i.hh index c6dbb54..b223608 100644 --- a/hscript/script_i.hh +++ b/hscript/script_i.hh @@ -63,6 +63,8 @@ struct Script::ScriptPrivate { std::unique_ptr<Timezone> tzone; /*! The version of Adélie to install. */ std::unique_ptr<Version> version; + /*! The desired bootloader configuration. */ + std::unique_ptr<Bootloader> boot; /*! Network addressing configuration */ std::vector< std::unique_ptr<NetAddress> > addresses; @@ -278,6 +280,17 @@ struct Script::ScriptPrivate { return true; } + bool store_bootloader(Key *obj, const ScriptLocation &pos, int *errors, + int *, const ScriptOptions &) { + if(boot) { + DUPLICATE_ERROR(boot, "bootloader", boot->value()) + return false; + } + std::unique_ptr<Bootloader> b(dynamic_cast<Bootloader *>(obj)); + boot = std::move(b); + return true; + } + bool store_username(Key *obj, const ScriptLocation &pos, int *errors, int *, const ScriptOptions &) { if(accounts.size() >= 255) { |