]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
lib/file: consistant usage of msec
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:47 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:47 +0000 (11:23 -0700)
We now want msec to be at the end, to be consistant with our current
usage.

open-vm-tools/lib/file/fileIOPosix.c
open-vm-tools/lib/file/filePosix.c
open-vm-tools/lib/include/fileIO.h

index 47e11381e60d846082c0316701facade8a791546..8efa62f75da2a50c6947e0d649fedcfcae3d745b 100644 (file)
@@ -801,7 +801,7 @@ FileIOCreateRetry(FileIODescriptor *file,   // OUT:
                   int access,               // IN:
                   FileIOOpenAction action,  // IN:
                   int mode,                 // IN: mode_t for creation
-                  uint32 msecMaxWaitTime)   // IN: Ignored
+                  uint32 maxWaitTimeMsec)   // IN: Ignored
 {
    uid_t uid = -1;
    int fd = -1;
@@ -1031,10 +1031,10 @@ FileIO_CreateRetry(FileIODescriptor *file,   // OUT:
                    int access,               // IN:
                    FileIOOpenAction action,  // IN:
                    int mode,                 // IN: mode_t for creation
-                   uint32 msecMaxWaitTime)   // IN:
+                   uint32 maxWaitTimeMsec)   // IN:
 {
    return FileIOCreateRetry(file, pathName, access, action, mode,
-                            msecMaxWaitTime);
+                            maxWaitTimeMsec);
 }
 
 
@@ -1093,12 +1093,12 @@ FileIO_OpenRetry(FileIODescriptor *file,   // OUT:
                  const char *pathName,     // IN:
                  int access,               // IN:
                  FileIOOpenAction action,  // IN:
-                 uint32 msecMaxWaitTime)   // IN:
+                 uint32 maxWaitTimeMsec)   // IN:
 {
 #if defined(VMX86_SERVER)
    FileIOResult res;
-   uint32 msecWaitTime = 0;
-   uint32 msecMaxLoopTime = 3000;  // 3 seconds
+   uint32 waitTimeMsec = 0;
+   uint32 maxLoopTimeMsec = 3000;  // 3 seconds
 
    /*
     * Workaround the ESX NFS client bug as seen in PR 1341775.
@@ -1109,14 +1109,14 @@ FileIO_OpenRetry(FileIODescriptor *file,   // OUT:
 
    while (TRUE) {
       res = FileIOCreateRetry(file, pathName, access, action,
-                              S_IRUSR | S_IWUSR, msecMaxWaitTime);
+                              S_IRUSR | S_IWUSR, maxWaitTimeMsec);
 
       if (res == FILEIO_ERROR && Err_Errno() == ESTALE &&
-          msecWaitTime < msecMaxLoopTime) {
+          waitTimeMsec < maxLoopTimeMsec) {
          Log(LGPFX "FileIOCreateRetry (%s) failed with ESTALE, retrying.\n",
              pathName);
 
-         msecWaitTime += FileSleeper(100, 300);
+         waitTimeMsec += FileSleeper(100, 300);
       } else {
          break;
       }
@@ -1125,7 +1125,7 @@ FileIO_OpenRetry(FileIODescriptor *file,   // OUT:
    return res;
 #else
    return FileIOCreateRetry(file, pathName, access, action,
-                            S_IRUSR | S_IWUSR, msecMaxWaitTime);
+                            S_IRUSR | S_IWUSR, maxWaitTimeMsec);
 #endif
 }
 
index 3a2b2dc348a6fb2ab929b42d3e81c892831aa4f7..e36c8d4320aecf0e63898cdf616fb90131f16e0f 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2006-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2006-2017 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -173,7 +173,7 @@ File_Rename(const char *oldName,  // IN:
 int
 File_RenameRetry(const char *oldFile,     // IN:
                  const char *newFile,     // IN:
-                 uint32 msecMaxWaitTime)  // IN: Unused.
+                 uint32 maxWaitTimeMsec)  // IN: Unused.
 {
    return File_Rename(oldFile, newFile);
 }
index a57b94471785ce119d9f489acbf19f89ff9c8a81..47f9f1a626ad278c7c4844bcab8854158f4b1412 100644 (file)
@@ -323,7 +323,7 @@ FileIOResult FileIO_CreateRetry(FileIODescriptor *file,
                                int access,
                                FileIOOpenAction action,
                                int mode,
-                               uint32 msecMaxWaitTime);
+                               uint32 maxWaitTimeMsec);
 
 FileIOResult FileIO_Open(FileIODescriptor *file,
                          const char *pathName,
@@ -334,7 +334,7 @@ FileIOResult FileIO_OpenRetry(FileIODescriptor *file,
                               const char *pathName,
                               int access,
                               FileIOOpenAction action,
-                              uint32 msecMaxWaitTime);
+                              uint32 maxWaitTimeMsec);
 
 uint64 FileIO_Seek(const FileIODescriptor *file,
                    int64 distance,