diff options
Diffstat (limited to 'hscript/disk.hh')
-rw-r--r-- | hscript/disk.hh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/hscript/disk.hh b/hscript/disk.hh index ad9a046..475b1ab 100644 --- a/hscript/disk.hh +++ b/hscript/disk.hh @@ -43,6 +43,26 @@ class Filesystem : public Key { }; class Mount : public Key { +private: + const std::string _block; + const std::string _mountpoint; + const std::string _opts; + + Mount(int _line, std::string my_block, std::string my_mountpoint, + std::string my_opts = "") : Key(_line), _block(my_block), + _mountpoint(my_mountpoint), _opts(my_opts) {} +public: + /*! Retrieve the block device to which this mount pertains. */ + const std::string device() const { return this->_block; } + /*! Retrieve the mountpoint for this mount. */ + const std::string mountpoint() const { return this->_mountpoint; } + /*! Retrieve the mount options for this mount, if any. */ + const std::string options() const { return this->_opts; } + + static Key *parseFromData(const std::string data, int lineno, int *errors, + int *warnings); + bool validate() const override; + bool execute() const override; }; } |