diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-02-22 20:24:44 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-02-22 20:24:44 -0600 |
commit | 9dcd2d0ca795524d22eacaf087f435e02fa66906 (patch) | |
tree | affba2b1c18341ad184d56d19d5bebca1321e593 /hscript | |
parent | f9e4335a86e0e9260c299292dba7905baa67fd9a (diff) | |
download | horizon-9dcd2d0ca795524d22eacaf087f435e02fa66906.tar.gz horizon-9dcd2d0ca795524d22eacaf087f435e02fa66906.tar.bz2 horizon-9dcd2d0ca795524d22eacaf087f435e02fa66906.tar.xz horizon-9dcd2d0ca795524d22eacaf087f435e02fa66906.zip |
hscript: Add HFS+ support to Filesystem key
Diffstat (limited to 'hscript')
-rw-r--r-- | hscript/disk.cc | 8 | ||||
-rw-r--r-- | hscript/disk.hh | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/hscript/disk.cc b/hscript/disk.cc index 9c3b655..4dbc471 100644 --- a/hscript/disk.cc +++ b/hscript/disk.cc @@ -583,7 +583,7 @@ bool Partition::execute(ScriptOptions opts) const { const static std::set<std::string> valid_fses = { - "ext2", "ext3", "ext4", "jfs", "vfat", "xfs" + "ext2", "ext3", "ext4", "hfs+", "jfs", "vfat", "xfs" }; @@ -627,6 +627,8 @@ Key *Filesystem::parseFromData(const std::string &data, int lineno, type = Ext3; } else if(fstype == "ext4") { type = Ext4; + } else if(fstype == "hfs+") { + type = HFSPlus; } else if(fstype == "jfs") { type = JFS; } else if(fstype == "vfat") { @@ -660,6 +662,10 @@ bool Filesystem::execute(ScriptOptions opts) const { case Ext4: cmd = "mkfs.ext4"; break; + case HFSPlus: + cmd = "mkfs.hfsplus"; + args.push_back("-w"); + break; case JFS: cmd = "mkfs.jfs"; args.push_back("-q"); diff --git a/hscript/disk.hh b/hscript/disk.hh index 2a43192..179807c 100644 --- a/hscript/disk.hh +++ b/hscript/disk.hh @@ -190,6 +190,7 @@ public: Ext2, Ext3, Ext4, + HFSPlus, JFS, VFAT, XFS |