diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-31 18:03:00 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-31 18:03:00 -0500 |
commit | f97ac86dc0dadc20b53d66dade311e4b4e50b7fc (patch) | |
tree | a40a77feec79df0169a8e322e3f93febaba89bbc /hscript/disk.hh | |
parent | cce8d9ba1541ef977260472d54461019e0e415ae (diff) | |
download | horizon-f97ac86dc0dadc20b53d66dade311e4b4e50b7fc.tar.gz horizon-f97ac86dc0dadc20b53d66dade311e4b4e50b7fc.tar.bz2 horizon-f97ac86dc0dadc20b53d66dade311e4b4e50b7fc.tar.xz horizon-f97ac86dc0dadc20b53d66dade311e4b4e50b7fc.zip |
hscript: Implement fs, add tests
Diffstat (limited to 'hscript/disk.hh')
-rw-r--r-- | hscript/disk.hh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hscript/disk.hh b/hscript/disk.hh index 43bb56d..53e2749 100644 --- a/hscript/disk.hh +++ b/hscript/disk.hh @@ -170,6 +170,21 @@ public: }; class Filesystem : public Key { +private: + const std::string _block; + const std::string _type; + + Filesystem(int _line, const std::string &_b, const std::string &_t) : + Key(_line), _block(_b), _type(_t) {} +public: + /*! Retrieve the block device on which to create the filesystem. */ + const std::string device() const { return this->_block; } + /*! Retreive the type of filesystem to create. */ + const std::string fstype() const { return this->_type; } + + static Key *parseFromData(const std::string &, int, int*, int*); + bool validate(ScriptOptions) const override; + bool execute(ScriptOptions) const override; }; class Mount : public Key { |