summaryrefslogtreecommitdiff
path: root/hscript/disk.hh
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-09 00:06:11 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-09 00:06:11 -0500
commit3eb6867efa16f891512710eb2bb852483337eb5c (patch)
tree726560275ea0a76a681ff7fe260c7ed1ddf8f14c /hscript/disk.hh
parent542e39743cd3fe85219bdb7fb00b385ac69f05c4 (diff)
downloadhorizon-3eb6867efa16f891512710eb2bb852483337eb5c.tar.gz
horizon-3eb6867efa16f891512710eb2bb852483337eb5c.tar.bz2
horizon-3eb6867efa16f891512710eb2bb852483337eb5c.tar.xz
horizon-3eb6867efa16f891512710eb2bb852483337eb5c.zip
hscript: Implement stub Mount parser
Diffstat (limited to 'hscript/disk.hh')
-rw-r--r--hscript/disk.hh20
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;
};
}