[Reproducible-commits] [dpkg] 03/37: dselect: Use EACCES instead of EWOULDBLOCK for fcntl(2) F_SETLK

Jérémy Bobbio lunar at moszumanska.debian.org
Sun Jan 31 16:28:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/buildinfo
in repository dpkg.

commit 742cb8c4fd0990867dd437cf52dd86ccabdf5f05
Author: Guillem Jover <guillem at debian.org>
Date:   Wed Dec 30 02:19:32 2015 +0100

    dselect: Use EACCES instead of EWOULDBLOCK for fcntl(2) F_SETLK
    
    This fcntl(2) sub-command returns either EACCES or EAGAIN on error.
    
    Warned-by: gcc-6
---
 debian/changelog  | 1 +
 dselect/method.cc | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3fac9b6..150a764 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ dpkg (1.18.5) UNRELEASED; urgency=medium
     and dpkg-scansources. Closes: #809219
   * Implement delete operator with size argument in dselect, required by the
     C++14 spec when the size-less delete operator is defined.
+  * Use EACCES instead of EWOULDBLOCK for fcntl(2) F_SETLK in dselect.
   * Documentation:
     - Say value instead of option in deb-control(5).
     - Mark debian changelog format in bold in dpkg-parsechangelog(1).
diff --git a/dselect/method.cc b/dselect/method.cc
index cdafd12..2d1ebc5 100644
--- a/dselect/method.cc
+++ b/dselect/method.cc
@@ -120,10 +120,10 @@ static enum urqresult lockmethod(void) {
   }
   fl.l_type=F_WRLCK; fl.l_whence=SEEK_SET; fl.l_start=fl.l_len=0;
   if (fcntl(methlockfd,F_SETLK,&fl) == -1) {
-    if (errno == EWOULDBLOCK || errno == EAGAIN) {
+    if (errno == EACCES || errno == EAGAIN) {
       sthfailed(_("the access method area is already locked"));
       return urqr_fail;
-      }
+    }
     sthfailed(_("cannot lock access method area"));
     return urqr_fail;
   }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list