StdIO_Success,
} StdIO_Status;
+typedef void (*SnowMotionLogger)(char *buf);
+
+void
+StdIO_ToggleSnowMotionLogging(SnowMotionLogger logger);
StdIO_Status
StdIO_ReadNextLine(FILE *stream, // IN
#include "vmware.h"
#include "dynbuf.h"
#include "vmstdio.h"
+#include "posixInt.h"
+
+
+static SnowMotionLogger snowMotionLogger = NULL;
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * StdIO_ToggleSnowMotionLogging --
+ *
+ * SnowMotion-specific log toggling - as per PR#2121674 and 2108730, vmx
+ * corruption appears to occur at some arbitrary point prior to VM powerOn,
+ * but only in CAT - it has not been reproducible locally or via manually
+ * triggered Nimbus testruns.
+ *
+ * To try to isolate the corruption point, add a toggled logging mechanism
+ * that will dump the results of SuperFGets for the interval between
+ * main initializing and VM powerOn.
+ *
+ * This is a strictly temporary mechanism to provide the necessary logging
+ * to debug this issue.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+StdIO_ToggleSnowMotionLogging(SnowMotionLogger logger) // IN:
+{
+ snowMotionLogger = logger;
+}
/*
*count = size;
+ if (snowMotionLogger != NULL) {
+ snowMotionLogger(buf);
+ }
+
return buf;
}