From: Oliver Kurth Date: Tue, 12 Nov 2019 02:12:23 +0000 (-0800) Subject: More LOG() calls changed to variadic form. X-Git-Tag: stable-11.1.0~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ead45ae869dfca654840fda4b8a6130c2779bf8;p=thirdparty%2Fopen-vm-tools.git More LOG() calls changed to variadic form. --- diff --git a/open-vm-tools/lib/file/fileIOPosix.c b/open-vm-tools/lib/file/fileIOPosix.c index e92f34cf2..4f259737d 100644 --- a/open-vm-tools/lib/file/fileIOPosix.c +++ b/open-vm-tools/lib/file/fileIOPosix.c @@ -1534,8 +1534,8 @@ FileIOCoalesce( } // XXX: Wouldn't it be nice if we could log from here! - //LOG(5, ("FILE: Coalescing %s of %d elements and %d size\n", - // isWrite ? "write" : "read", inCount, inTotalSize)); + //LOG(5, "FILE: Coalescing %s of %d elements and %d size\n", + // isWrite ? "write" : "read", inCount, inTotalSize); if (filePosixOptions.aligned || flags & FILEIO_OPEN_UNBUFFERED) { cBuf = FileIOAligned_Malloc(sizeof(uint8) * inTotalSize); diff --git a/open-vm-tools/lib/file/fileLockPosix.c b/open-vm-tools/lib/file/fileLockPosix.c index 5d7c9e9d4..47d3fd313 100644 --- a/open-vm-tools/lib/file/fileLockPosix.c +++ b/open-vm-tools/lib/file/fileLockPosix.c @@ -60,6 +60,7 @@ #include "unicodeOperations.h" #define LOGLEVEL_MODULE main +#define LOGLEVEL_VARIADIC #include "loglevel_user.h" #define DEVICE_LOCK_DIR "/var/lock" @@ -468,8 +469,7 @@ FileLock_LockDevice(const char *deviceName) // IN: lockFileLink = Str_SafeAsprintf(NULL, "%s/LTMP..%s.t%05d", DEVICE_LOCK_DIR, deviceName, getpid()); - LOG(1, ("Requesting lock %s (temp = %s).\n", lockFileName, - lockFileLink)); + LOG(1, "Requesting lock %s (temp = %s).\n", lockFileName, lockFileLink); hostID = FileLockGetMachineID(); Str_Sprintf(uniqueID, sizeof uniqueID, "%d %s\n", @@ -552,7 +552,7 @@ FileLock_UnlockDevice(const char *deviceName) // IN: path = Str_SafeAsprintf(NULL, "%s/LCK..%s", DEVICE_LOCK_DIR, deviceName); - LOG(1, ("Releasing lock %s.\n", path)); + LOG(1, "Releasing lock %s.\n", path); uid = Id_BeginSuperUser(); ret = unlink(path); diff --git a/open-vm-tools/lib/file/fileLockPrimitive.c b/open-vm-tools/lib/file/fileLockPrimitive.c index 9f0bdea07..07b83935c 100644 --- a/open-vm-tools/lib/file/fileLockPrimitive.c +++ b/open-vm-tools/lib/file/fileLockPrimitive.c @@ -58,6 +58,7 @@ #include "unicodeOperations.h" #define LOGLEVEL_MODULE main +#define LOGLEVEL_VARIADIC #include "loglevel_user.h" #define LOCK_SHARED "S" @@ -993,7 +994,7 @@ FileUnlockIntrinsic(FileLockToken *tokenPtr) // IN: ASSERT(tokenPtr && (tokenPtr->signature == FILELOCK_TOKEN_SIGNATURE)); - LOG(1, ("Requesting unlock on %s\n", tokenPtr->pathName)); + LOG(1, "Requesting unlock on %s\n", tokenPtr->pathName); if (tokenPtr->portable) { /* @@ -1041,9 +1042,8 @@ FileUnlockIntrinsic(FileLockToken *tokenPtr) // IN: * ENOENT: other locked + unlocked (w/ implicit unlink) file */ if (Err_Errno() == EBUSY || Err_Errno() == ENOENT) { - LOG(0, ("Tolerating %s on unlink of advisory lock at %s\n", - Err_Errno() == EBUSY ? "EBUSY" : "ENOENT", - tokenPtr->pathName)); + LOG(0, "Tolerating %s on unlink of advisory lock at %s\n", + Err_Errno() == EBUSY ? "EBUSY" : "ENOENT", tokenPtr->pathName); } else { err = Err_Errno(); if (vmx86_debug) { @@ -1873,8 +1873,8 @@ FileLockIntrinsic(const char *pathName, // IN: myValues.maxWaitTimeMsec = maxWaitTimeMsec; if (File_SupportsMandatoryLock(pathName)) { - LOG(1, ("Requesting %s lock on %s (mandatory, %u).\n", - myValues.lockType, pathName, myValues.maxWaitTimeMsec)); + LOG(1, "Requesting %s lock on %s (mandatory, %u).\n", + myValues.lockType, pathName, myValues.maxWaitTimeMsec); tokenPtr = FileLockIntrinsicMandatory(pathName, lockBase, &myValues, err); } else { @@ -1884,9 +1884,9 @@ FileLockIntrinsic(const char *pathName, // IN: myValues.locationChecksum = FileLockLocationChecksum(lockBase); // free this! myValues.memberName = NULL; - LOG(1, ("Requesting %s lock on %s (%s, %s, %u).\n", + LOG(1, "Requesting %s lock on %s (%s, %s, %u).\n", myValues.lockType, pathName, myValues.machineID, - myValues.executionID, myValues.maxWaitTimeMsec)); + myValues.executionID, myValues.maxWaitTimeMsec); tokenPtr = FileLockIntrinsicPortable(pathName, lockBase, &myValues, err); diff --git a/open-vm-tools/lib/file/filePosix.c b/open-vm-tools/lib/file/filePosix.c index 70a0f14d8..b4a3cd857 100644 --- a/open-vm-tools/lib/file/filePosix.c +++ b/open-vm-tools/lib/file/filePosix.c @@ -73,6 +73,7 @@ #endif #define LOGLEVEL_MODULE main +#define LOGLEVEL_VARIADIC #include "loglevel_user.h" #include "unicodeOperations.h" @@ -2525,9 +2526,9 @@ FileVMKGetMaxOrSupportsFileSize(const char *pathName, // IN: /* * Try the old way if IOCTL failed. */ - LOG(0, (LGPFX" %s: Failed to figure out max file size via " - "IOCTLCMD_VMFS_GET_MAX_FILE_SIZE. Falling back to old method.\n", - __func__)); + LOG(0, LGPFX" %s: Failed to figure out max file size via " + "IOCTLCMD_VMFS_GET_MAX_FILE_SIZE. Falling back to old method.\n", + __func__); maxFileSize = -1; if (File_GetVMFSAttributes(pathName, &fsAttrs) < 0) { diff --git a/open-vm-tools/lib/file/fileTempPosix.c b/open-vm-tools/lib/file/fileTempPosix.c index 097d1d499..e3a46f9e6 100644 --- a/open-vm-tools/lib/file/fileTempPosix.c +++ b/open-vm-tools/lib/file/fileTempPosix.c @@ -54,6 +54,7 @@ #include "localconfig.h" #define LOGLEVEL_MODULE util +#define LOGLEVEL_VARIADIC #include "loglevel_user.h"