From 394f68d137a6c5438ccc790ec3a34cd688397a41 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 14 Oct 2019 08:09:40 -0500 Subject: hscript: Use return value of access(3) properly --- hscript/disk.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hscript/disk.cc') 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 { -- cgit v1.2.3-60-g2f50