summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-14 08:09:40 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-14 08:09:40 -0500
commit394f68d137a6c5438ccc790ec3a34cd688397a41 (patch)
treeaed5e70ed8ef362fbb18998f819743dc1c26b032
parent3599b5f49c90870f890cb5c50ca8c8e87a0fc534 (diff)
downloadhorizon-394f68d137a6c5438ccc790ec3a34cd688397a41.tar.gz
horizon-394f68d137a6c5438ccc790ec3a34cd688397a41.tar.bz2
horizon-394f68d137a6c5438ccc790ec3a34cd688397a41.tar.xz
horizon-394f68d137a6c5438ccc790ec3a34cd688397a41.zip
hscript: Use return value of access(3) properly
-rw-r--r--hscript/disk.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/hscript/disk.cc b/hscript/disk.cc
index 45b2281..5303ccc 100644
--- a/hscript/disk.cc
+++ b/hscript/disk.cc
@@ -72,7 +72,7 @@ bool Mount::validate(ScriptOptions options) const {
* already exist. However, we must take in to account that block devices
* may not yet exist during the script validation phase. This check may
* need to happen in Script::validate like the Uniqueness tests. */
- return(access(this->device().c_str(), F_OK));
+ return(access(this->device().c_str(), F_OK) == 0);
}
bool Mount::execute(ScriptOptions options) const {