]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
LOG_ONCE changes to variadic just as LOG did recently.
authorOliver Kurth <okurth@vmware.com>
Mon, 6 Jan 2020 23:46:20 +0000 (15:46 -0800)
committerOliver Kurth <okurth@vmware.com>
Mon, 6 Jan 2020 23:46:20 +0000 (15:46 -0800)
open-vm-tools/lib/file/fileIOPosix.c
open-vm-tools/lib/include/vm_assert.h
open-vm-tools/modules/shared/vmxnet/net.h

index 32f6cec362a444f69f46817bec4289821c167272..30f01c21bd1438396f470c6d0c7a08182b9f12b1 100644 (file)
@@ -915,8 +915,8 @@ FileIOCreateRetry(FileIODescriptor *file,   // OUT:
       flags |= O_DIRECT;
 #elif !defined(__APPLE__) // Mac hosts need this access flag after opening.
       access &= ~FILEIO_OPEN_UNBUFFERED;
-      LOG_ONCE((LGPFX" %s reverting to buffered IO on %s.\n",
-                __FUNCTION__, pathName));
+      LOG_ONCE(LGPFX" %s reverting to buffered IO on %s.\n",
+               __FUNCTION__, pathName);
 #endif
    }
 
@@ -1971,8 +1971,8 @@ FileIOPwritevCoalesced(
              * already checked for retval == -1 above, so the cast
              * below should be OK. Refer to bug 817761.
              */
-            LOG_ONCE((LGPFX" %s wrote %"FMTSZ"u out of %"FMTSZ"u bytes.\n",
-                      __FUNCTION__, (size_t)retval, leftToWrite));
+            LOG_ONCE(LGPFX" %s wrote %"FMTSZ"u out of %"FMTSZ"u bytes.\n",
+                     __FUNCTION__, (size_t)retval, leftToWrite);
          }
 
          buf += retval;
@@ -3050,15 +3050,15 @@ void
 FileIOAligned_PoolExit(void)
 {
    if (!alignedPool.lock) {
-      LOG_ONCE(("%s called without FileIOAligned_Pool lock\n", __FUNCTION__));
+      LOG_ONCE("%s called without FileIOAligned_Pool lock\n", __FUNCTION__);
       return;
    }
 
    MXUser_AcquireExclLock(alignedPool.lock);
 
    if (alignedPool.numBusy > 0) {
-      LOG_ONCE(("%s: %d busy buffers!  Proceeding with trepidation.\n",
-               __FUNCTION__, alignedPool.numBusy));
+      LOG_ONCE("%s: %d busy buffers!  Proceeding with trepidation.\n",
+               __FUNCTION__, alignedPool.numBusy);
    }
    while (alignedPool.numAlloc > 0) {
       alignedPool.numAlloc--;
@@ -3098,7 +3098,7 @@ FileIOAligned_PoolMalloc(size_t size)  // IN:
    void *buf = NULL;
 
    if (!alignedPool.lock) {
-      LOG_ONCE(("%s called without FileIOAligned_Pool lock\n", __FUNCTION__));
+      LOG_ONCE("%s called without FileIOAligned_Pool lock\n", __FUNCTION__);
       return NULL;
    }
 
@@ -3160,7 +3160,7 @@ FileIOAligned_PoolFree(void *ptr)  // IN:
    VmTimeType now;
 
    if (!alignedPool.lock) {
-      LOG_ONCE(("%s called without FileIOAligned_Pool lock\n", __FUNCTION__));
+      LOG_ONCE("%s called without FileIOAligned_Pool lock\n", __FUNCTION__);
 
       return FALSE;
    }
index 5fbdf69a2261902ebc703fe9241f45bbb1c00c5c..bb18cdc974e56151f711c6de6bacb2c3429821cb 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2017,2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2019 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
@@ -246,7 +246,7 @@ void WarningThrottled(uint32 *count, const char *fmt, ...) PRINTF_DECL(2, 3);
       count = (count + 1) & 1023;                                       \
    } while (0)
 
-#define LOG_ONCE(_s) DO_ONCE(Log _s)
+#define LOG_ONCE(...) DO_ONCE(Log(__VA_ARGS__))
 
 
 /*
index 731c5f69ad3bce89df8a28cc74eefab3008d8060..5099c5749cd3cc1a393d5344bce51b92d83a32ed 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2016,2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2019 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -214,7 +214,7 @@ Net_GetNumAdapters(Net_AdapterCount *counts)
       } else if (Str_Strcasecmp(adapterStr, "e1000e") == 0) {
          counts->e1000e++;
       } else {
-         LOG_ONCE(("%s: unknown adapter: %s\n", __FUNCTION__, adapterStr));
+         LOG_ONCE("%s: unknown adapter: %s\n", __FUNCTION__, adapterStr);
       }
       free(adapterStr);
    }