From: VMware, Inc <> Date: Thu, 27 Oct 2011 18:44:27 +0000 (-0700) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2011.10.26-514583~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4ffab16fdc330e81b9d60f673657ccca2a3df60;p=thirdparty%2Fopen-vm-tools.git Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/file/fileLockPosix.c b/open-vm-tools/lib/file/fileLockPosix.c index bc79d04bb..655d41dd9 100644 --- a/open-vm-tools/lib/file/fileLockPosix.c +++ b/open-vm-tools/lib/file/fileLockPosix.c @@ -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;