From: Oliver Kurth Date: Fri, 27 Jul 2018 18:46:21 +0000 (-0700) Subject: Yet More SnowMotion Logging X-Git-Tag: stable-11.0.0~511 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46ad0b583d41027e5b188b76bb96fd15fcbe5127;p=thirdparty%2Fopen-vm-tools.git Yet More SnowMotion Logging Prior logging indicates an issue when reading back from disk, so tweak the logging to report the count# (since SuperFgets doesn't log null terminators) of bytes and add a log to Dictionary_WriteFile to log the last 100 bytes of the buffer. --- diff --git a/open-vm-tools/lib/include/vmstdio.h b/open-vm-tools/lib/include/vmstdio.h index 00adc1184..18dcc8347 100644 --- a/open-vm-tools/lib/include/vmstdio.h +++ b/open-vm-tools/lib/include/vmstdio.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2017 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2018 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 @@ -37,7 +37,7 @@ typedef enum { StdIO_Success, } StdIO_Status; -typedef void (*SnowMotionLogger)(char *buf); +typedef void (*SnowMotionLogger)(char *buf, size_t count); void StdIO_ToggleSnowMotionLogging(SnowMotionLogger logger); diff --git a/open-vm-tools/lib/misc/vmstdio.c b/open-vm-tools/lib/misc/vmstdio.c index 6d8075eb5..c633fbac4 100644 --- a/open-vm-tools/lib/misc/vmstdio.c +++ b/open-vm-tools/lib/misc/vmstdio.c @@ -166,7 +166,7 @@ SuperFgets(FILE *stream, // IN: *count = size; if (snowMotionLogger != NULL) { - snowMotionLogger(buf); + snowMotionLogger(buf, *count); } return buf;