]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes in shared code that don't affect open-vm-tools functionality.
authorVMware, Inc <>
Thu, 27 Oct 2011 18:44:27 +0000 (11:44 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Thu, 27 Oct 2011 18:44:27 +0000 (11:44 -0700)
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/file/fileLockPosix.c

index bc79d04bbc8bafac16813e3a85a3537be32979ab..655d41dd95f8eaf05204a5908717373f328d739d 100644 (file)
@@ -1141,7 +1141,16 @@ FileLock_Lock(ConstUnicode filePath,         // IN:
    }
 
    if (tokenPtr == NULL) {
-      FileLockAppendMessage(msgs, res);
+      int errnoValue;
+
+      if (res == 0) {
+         errnoValue = EAGAIN;  // Thank you for playing; try again
+         /* Failed to acquire the lock; another has possession of it */
+      } else {
+         errnoValue = res;
+      }
+
+      FileLockAppendMessage(msgs, errnoValue);
    }
 
    return tokenPtr;