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
}
* 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;
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--;
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;
}
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;
}
/*********************************************************
- * 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
count = (count + 1) & 1023; \
} while (0)
-#define LOG_ONCE(_s) DO_ONCE(Log _s)
+#define LOG_ONCE(...) DO_ONCE(Log(__VA_ARGS__))
/*
/*********************************************************
- * 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
} 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);
}