From c7047212aa04fbf622b1b1852d3812742ec018ad Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 22 Jul 2022 13:48:43 +0200 Subject: [PATCH] Fix Mocha_StartUSBLogging definition --- include/mocha/mocha.h | 15 ++++++++------- source/utils.cpp | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/mocha/mocha.h b/include/mocha/mocha.h index f85bcb6..f1dcdcb 100644 --- a/include/mocha/mocha.h +++ b/include/mocha/mocha.h @@ -50,14 +50,15 @@ MochaUtilsStatus Mocha_CheckAPIVersion(uint32_t *outVersion); */ MochaUtilsStatus Mocha_GetEnvironmentPath(char *environmentPathBuffer, uint32_t bufferLen); -/*** -* Starts the MCP Thread in mocha to allows usage of /dev/iosuhax and wupclient -* @return MOCHA_RESULT_SUCCESS -* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.
-* MOCHA_RESULT_UNSUPPORTED_COMMAND: Command not supported by the currently loaded mocha version.
-* MOCHA_RESULT_UNKNOWN_ERROR: Failed to retrieve the environment path. +/** + * Enables logging via USB (FTDI FT232 chipset only) via OSReport and friends.
+ * @param notSkipExistingLogs If set to true, existing logs of this session won't be skipped. + * @return MOCHA_RESULT_SUCCESS: Logging via USB starts or has already been started
+ * MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.
+ * MOCHA_RESULT_UNSUPPORTED_COMMAND: Command not supported by the currently loaded mocha version.
+ * MOCHA_RESULT_UNKNOWN_ERROR: Failed to retrieve the environment path. */ -MochaUtilsStatus Mocha_StartUSBLogging(bool avoidLogCatchup); +MochaUtilsStatus Mocha_StartUSBLogging(bool notSkipExistingLogs); /** * Gives a FSClient full permissions.
diff --git a/source/utils.cpp b/source/utils.cpp index 1d154be..906b62b 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -80,7 +80,7 @@ MochaUtilsStatus Mocha_GetEnvironmentPath(char *environmentPathBuffer, uint32_t return res; } -MochaUtilsStatus Mocha_StartUSBLogging(bool avoidLogCatchup) { +MochaUtilsStatus Mocha_StartUSBLogging(bool notSkipExistingLogs) { if (!mochaInitDone) { return MOCHA_RESULT_LIB_UNINITIALIZED; } @@ -92,7 +92,7 @@ MochaUtilsStatus Mocha_StartUSBLogging(bool avoidLogCatchup) { if (mcpFd >= 0) { ALIGN_0x40 uint32_t io_buffer[0x40 / 4]; io_buffer[0] = IPC_CUSTOM_START_USB_LOGGING; - io_buffer[1] = avoidLogCatchup; + io_buffer[1] = notSkipExistingLogs; if (IOS_Ioctl(mcpFd, 100, io_buffer, 8, io_buffer, 0x4) == IOS_ERROR_OK) { res = MOCHA_RESULT_SUCCESS;