summaryrefslogtreecommitdiff
path: root/hscript/disk.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-22 20:24:44 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-22 20:24:44 -0600
commit9dcd2d0ca795524d22eacaf087f435e02fa66906 (patch)
treeaffba2b1c18341ad184d56d19d5bebca1321e593 /hscript/disk.cc
parentf9e4335a86e0e9260c299292dba7905baa67fd9a (diff)
downloadhorizon-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/disk.cc')
-rw-r--r--hscript/disk.cc8
1 files changed, 7 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");