From: John Wolfe Date: Wed, 20 Apr 2022 20:24:07 +0000 (-0700) Subject: Enable time step correction log in all builds. X-Git-Tag: stable-12.0.5~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0de81f5c52415abc5ba82d6c72de91a830b6722;p=thirdparty%2Fopen-vm-tools.git Enable time step correction log in all builds. Enabled logging of the information in all builds of open-vm-tools. This is useful for auditing and for debugging. --- diff --git a/open-vm-tools/services/plugins/timeSync/timeSync.c b/open-vm-tools/services/plugins/timeSync/timeSync.c index f2f2c1ed9..8c48cbd0d 100644 --- a/open-vm-tools/services/plugins/timeSync/timeSync.c +++ b/open-vm-tools/services/plugins/timeSync/timeSync.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2021 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2022 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 @@ -410,9 +410,7 @@ TimeSyncStepTime(TimeSyncData *data, int64 adjustment) int64 before; int64 after; - if (vmx86_debug) { - TimeSync_GetCurrentTime(&before); - } + TimeSync_GetCurrentTime(&before); /* Stepping invalidates the current slew, reset to nominal. */ TimeSyncSetSlewState(data, FALSE); @@ -421,21 +419,19 @@ TimeSyncStepTime(TimeSyncData *data, int64 adjustment) return FALSE; } - /* + /* * Tell timetracker to stop trying to catch up, since we have corrected - * both the guest OS error and the apparent time error. + * both the guest OS error and the apparent time error. */ bp.in.cx.halfs.low = BDOOR_CMD_STOPCATCHUP; Backdoor(&bp); - if (vmx86_debug) { - TimeSync_GetCurrentTime(&after); - - g_debug("Time changed by %"FMT64"dus from %"FMT64"d.%06"FMT64"d -> " - "%"FMT64"d.%06"FMT64"d\n", adjustment, - before / US_PER_SEC, before % US_PER_SEC, - after / US_PER_SEC, after % US_PER_SEC); - } + TimeSync_GetCurrentTime(&after); + + g_debug("Time changed by %"FMT64"dus from %"FMT64"d.%06"FMT64"d -> " + "%"FMT64"d.%06"FMT64"d\n", adjustment, + before / US_PER_SEC, before % US_PER_SEC, + after / US_PER_SEC, after % US_PER_SEC); return TRUE; }