Don't log if failed to remove non-existing condition

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-10-18 22:05:00 +02:00
parent 3ef75ac176
commit 978beb8e7e
+1 -1
View File
@@ -55,7 +55,7 @@ int cond_set_path(const char *path, enum cond_state new)
break;
case COND_OFF:
if (unlink(path))
if (unlink(path) && errno != ENOENT)
_pe("Failed removing condition '%s'", path);
break;