diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-09-02 16:41:06 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-09-02 16:41:06 +0000 |
commit | 8b4f34f1879498a9faa55f662a67ec286fa7bea1 (patch) | |
tree | 813b37dbc00470183db9195c7b5478afc607d8b9 /src/libs6rc | |
parent | da164d5a27f61e3f935e3b223849fabbd717fc30 (diff) | |
download | s6-rc-8b4f34f1879498a9faa55f662a67ec286fa7bea1.tar.xz |
s6rc_lock bugfix for EROFS
Diffstat (limited to 'src/libs6rc')
-rw-r--r-- | src/libs6rc/s6rc_lock.c | 2 |
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 ; } } |