From 8b4f34f1879498a9faa55f662a67ec286fa7bea1 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 2 Sep 2015 16:41:06 +0000 Subject: s6rc_lock bugfix for EROFS --- src/libs6rc/s6rc_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ; } } -- cgit v1.2.3