summaryrefslogtreecommitdiff
path: root/hscript/disk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'hscript/disk.cc')
-rw-r--r--hscript/disk.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/hscript/disk.cc b/hscript/disk.cc
index c41e6d0..3423928 100644
--- a/hscript/disk.cc
+++ b/hscript/disk.cc
@@ -381,6 +381,29 @@ bool Partition::execute(ScriptOptions) const {
}
+Key *LVMPhysical::parseFromData(const std::string &data, int lineno,
+ int *errors, int *warnings) {
+ if(data.size() < 6 || data.substr(0, 5) != "/dev/") {
+ if(errors) *errors += 1;
+ output_error("installfile:" + std::to_string(lineno),
+ "lvm_pv: expected an absolute path to a block device");
+ return nullptr;
+ }
+
+ /*if(access(data.c_str(), F_OK) != 0) {
+ if(warnings) *warnings += 1;
+ output_warning("installfile:" + std::to_string(lineno),
+ "lvm_pv: device may not exist");
+ }*/
+
+ return new LVMPhysical(lineno, data);
+}
+
+bool LVMPhysical::execute(ScriptOptions) const {
+ return false;
+}
+
+
Key *Mount::parseFromData(const std::string &data, int lineno, int *errors,
int *warnings) {
std::string dev, where, opt;