diff options
Diffstat (limited to 'hscript/script_i.hh')
-rw-r--r-- | hscript/script_i.hh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hscript/script_i.hh b/hscript/script_i.hh index cb7da13..9d854eb 100644 --- a/hscript/script_i.hh +++ b/hscript/script_i.hh @@ -46,6 +46,8 @@ struct Script::ScriptPrivate { std::set<std::string> packages; /*! The root shadow line. */ std::unique_ptr<RootPassphrase> rootpw; + /*! The system CPU architecture. */ + std::unique_ptr<Arch> arch; /*! The system language. */ std::unique_ptr<Language> lang; /*! The system keymap. */ @@ -148,6 +150,16 @@ struct Script::ScriptPrivate { return true; } + bool store_arch(Key* obj, int line, int *errors, int *, ScriptOptions) { + if(arch) { + DUPLICATE_ERROR(arch, "arch", arch->value()) + return false; + } + std::unique_ptr<Arch> a(dynamic_cast<Arch *>(obj)); + arch = std::move(a); + return true; + } + bool store_rootpw(Key* obj, int line, int *errors, int *, ScriptOptions) { if(rootpw) { DUPLICATE_ERROR(rootpw, "rootpw", "an encrypted passphrase") |