summaryrefslogtreecommitdiff
path: root/src/libs6rc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6rc')
-rw-r--r--src/libs6rc/s6rc_lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs6rc/s6rc_lock.c b/src/libs6rc/s6rc_lock.c
index 69ec75b..234df9f 100644
--- a/src/libs6rc/s6rc_lock.c
+++ b/src/libs6rc/s6rc_lock.c
@@ -30,7 +30,7 @@ int s6rc_lock (char const *live, int lwhat, int *llfd, char const *compiled, int
byte_copy(cfn + clen, 6, "/lock") ;
cfd = open_create(cfn) ;
if (cfd < 0)
- if (cwhat == 1 || errno != EROFS) { e = errno ; goto lerr ; }
+ if (cwhat > 1 || errno != EROFS) { e = errno ; goto lerr ; }
else cfd = -errno ;
else if ((cwhat > 1 ? lock_ex(cfd) : lock_sh(cfd)) < 0) { e = errno ; goto cerr ; }
}