summaryrefslogtreecommitdiff
path: root/hscript/disk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'hscript/disk.cc')
-rw-r--r--hscript/disk.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/hscript/disk.cc b/hscript/disk.cc
index 9d700dd..5d3112f 100644
--- a/hscript/disk.cc
+++ b/hscript/disk.cc
@@ -47,6 +47,7 @@ bool DiskId::validate(ScriptOptions options) const {
/* We only validate if running in an Installation Environment. */
if(!options.test(InstallEnvironment)) return true;
+#ifdef HAS_INSTALL_ENV
/* Unlike 'mount', 'diskid' *does* require that the block device exist
* before installation begins. This test is always valid. */
struct stat blk_stat;
@@ -62,6 +63,7 @@ bool DiskId::validate(ScriptOptions options) const {
"diskid: " + _block + " is not a valid block device");
return false;
}
+#endif /* HAS_INSTALL_ENV */
return true;
}