Windows: daemon-windows lockfile
authorAlin Serdean <aserdean@cloudbasesolutions.com>
Mon, 25 Jul 2016 21:58:10 +0000 (21:58 +0000)
committerGurucharan Shetty <guru@ovn.org>
Tue, 26 Jul 2016 14:13:43 +0000 (07:13 -0700)
_get_osfhandle returns an errno value not a GetLastErrorValue.
(https://msdn.microsoft.com/en-us/library/ks2530z6(v=vs.120).aspx)

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Paul Boca <pboca@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
lib/daemon-windows.c

index d77724e..7e2e9da 100644 (file)
@@ -417,7 +417,7 @@ flock(FILE* fd, int operation)
     hFile = (HANDLE)_get_osfhandle(fileno(fd));
     if (hFile == INVALID_HANDLE_VALUE) {
         VLOG_FATAL("Failed to get PID file handle (%s).",
-                   ovs_lasterror_to_string());
+                   ovs_strerror(errno));
     }
 
     if (operation & LOCK_UNLOCK) {