]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/contrib/mmap.cc:
authorColin Watson <cjwatson@canonical.com>
Sat, 22 Sep 2007 20:38:43 +0000 (21:38 +0100)
committerColin Watson <cjwatson@canonical.com>
Sat, 22 Sep 2007 20:38:43 +0000 (21:38 +0100)
  - don't fail if msync() returns > 0 (LP: #144001)

apt-pkg/contrib/mmap.cc
debian/changelog

index 7f814c2d2a9b1e13c38e19e9c1d85aa2b64e6366..abcae46feee411e0beb7b7bd97a057bf7264ff7a 100644 (file)
@@ -117,7 +117,7 @@ bool MMap::Sync()
    
 #ifdef _POSIX_SYNCHRONIZED_IO   
    if ((Flags & ReadOnly) != ReadOnly)
-      if (msync((char *)Base,iSize,MS_SYNC) != 0)
+      if (msync((char *)Base,iSize,MS_SYNC) < 0)
         return _error->Errno("msync","Unable to write mmap");
 #endif   
    return true;
@@ -134,7 +134,7 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop)
 #ifdef _POSIX_SYNCHRONIZED_IO
    unsigned long PSize = sysconf(_SC_PAGESIZE);
    if ((Flags & ReadOnly) != ReadOnly)
-      if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) != 0)
+      if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) < 0)
         return _error->Errno("msync","Unable to write mmap");
 #endif   
    return true;
index effaed1f7b371211ea72dfb9cb5393ab5cd72e42..60fce30150889f6c9ab542411988b995ea20db1e 100644 (file)
@@ -1,3 +1,10 @@
+apt (0.7.6ubuntu11) UNRELEASED; urgency=low
+
+  * apt-pkg/contrib/mmap.cc:
+    - don't fail if msync() returns > 0 (LP: #144001)
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Sat, 22 Sep 2007 21:21:19 +0100
+
 apt (0.7.6ubuntu10) gutsy; urgency=low
 
   * apt-pkg/deb/dpkgpm.cc: