diff options
Diffstat (limited to 'hscript/disk.hh')
-rw-r--r-- | hscript/disk.hh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/hscript/disk.hh b/hscript/disk.hh index 7722780..2a43192 100644 --- a/hscript/disk.hh +++ b/hscript/disk.hh @@ -185,17 +185,26 @@ public: }; class Filesystem : public Key { +public: + enum FilesystemType { + Ext2, + Ext3, + Ext4, + JFS, + VFAT, + XFS + }; private: const std::string _block; - const std::string _type; + FilesystemType _type; - Filesystem(int _line, const std::string &_b, const std::string &_t) : + Filesystem(int _line, const std::string &_b, FilesystemType _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; } + FilesystemType fstype() const { return this->_type; } static Key *parseFromData(const std::string &, int, int*, int*); bool validate(ScriptOptions) const override; |