]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxclock: return the right error when open lock file failed
authorLong Wang <w@laoqinren.net>
Mon, 3 Jul 2017 07:41:25 +0000 (15:41 +0800)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 15 Aug 2017 22:56:17 +0000 (18:56 -0400)
Signed-off-by: Long Wang <w@laoqinren.net>
src/lxc/lxclock.c

index 2871c5af87081ab28f929e7d2d421e9d441de5d1..9158db5553215b1a6fc461facd435dbb2a4af394 100644 (file)
@@ -229,6 +229,7 @@ int lxclock(struct lxc_lock *l, int timeout)
                                        S_IWUSR | S_IRUSR);
                        if (l->u.f.fd == -1) {
                                ERROR("Error opening %s", l->u.f.fname);
+                               saved_errno = errno;
                                goto out;
                        }
                }