Remove debug comments

This commit is contained in:
Maschell 2022-09-07 01:02:11 +02:00
parent f84def0502
commit 08d764d249

View File

@ -6,16 +6,12 @@
DECL_FUNCTION(void, __PPCExit, uint32_t u1) { DECL_FUNCTION(void, __PPCExit, uint32_t u1) {
if (gSDMountRefCount > 0) { if (gSDMountRefCount > 0) {
DEBUG_FUNCTION_LINE_WARN("SDCard is still mounted. Ref counter: %d\n", gSDMountRefCount);
FSAInit(); FSAInit();
auto client = FSAAddClient(nullptr); auto client = FSAAddClient(nullptr);
if (client) { if (client) {
auto res = FSAUnmount(client, "/vol/external01/", FSA_UNMOUNT_FLAG_BIND_MOUNT); FSAUnmount(client, "/vol/external01/", FSA_UNMOUNT_FLAG_BIND_MOUNT);
DEBUG_FUNCTION_LINE_WARN("Unmount res %d %s", res, FSAGetStatusStr(res));
} }
gSDMountRefCount = 0; gSDMountRefCount = 0;
} else {
DEBUG_FUNCTION_LINE_WARN("Refcount %d", gSDMountRefCount);
} }
real___PPCExit(u1); real___PPCExit(u1);
} }
@ -26,7 +22,6 @@ DECL_FUNCTION(FSStatus, FSMount, FSClient *client, FSCmdBlock *cmd, FSMountSourc
gSDMountRefCount++; gSDMountRefCount++;
return FS_STATUS_OK; return FS_STATUS_OK;
} }
DEBUG_FUNCTION_LINE_WARN("Do real mount for /vol/external01");
auto res = real_FSMount(client, cmd, source, target, bytes, errorMask); auto res = real_FSMount(client, cmd, source, target, bytes, errorMask);
if (res == FS_STATUS_OK) { if (res == FS_STATUS_OK) {
gSDMountRefCount++; gSDMountRefCount++;
@ -43,7 +38,6 @@ DECL_FUNCTION(FSStatus, FSUnmount, FSClient *client, FSCmdBlock *cmd, const char
gSDMountRefCount--; gSDMountRefCount--;
if (gSDMountRefCount <= 0) { if (gSDMountRefCount <= 0) {
gSDMountRefCount = 0; gSDMountRefCount = 0;
DEBUG_FUNCTION_LINE_WARN("Do real unmount for /vol/external01");
return real_FSUnmount(client, cmd, target, errorMask); return real_FSUnmount(client, cmd, target, errorMask);
} }
return FS_STATUS_OK; return FS_STATUS_OK;
@ -57,7 +51,6 @@ DECL_FUNCTION(FSError, FSAMount, FSAClientHandle client, const char *source, con
gSDMountRefCount++; gSDMountRefCount++;
return FS_ERROR_OK; return FS_ERROR_OK;
} }
DEBUG_FUNCTION_LINE_WARN("Do real mount for /vol/external01");
auto res = real_FSAMount(client, source, target, flags, arg_buf, arg_len); auto res = real_FSAMount(client, source, target, flags, arg_buf, arg_len);
if (res == FS_ERROR_OK || res == FS_ERROR_ALREADY_EXISTS) { if (res == FS_ERROR_OK || res == FS_ERROR_ALREADY_EXISTS) {
gSDMountRefCount++; gSDMountRefCount++;
@ -72,7 +65,6 @@ DECL_FUNCTION(FSError, FSAUnmount, FSAClientHandle client, const char *mountedTa
if (std::string_view(mountedTarget) == "/vol/external01") { if (std::string_view(mountedTarget) == "/vol/external01") {
gSDMountRefCount--; gSDMountRefCount--;
if (gSDMountRefCount <= 0) { if (gSDMountRefCount <= 0) {
DEBUG_FUNCTION_LINE_WARN("Do real unmount for /vol/external01");
auto res = real_FSAUnmount(client, mountedTarget, flags); auto res = real_FSAUnmount(client, mountedTarget, flags);
gSDMountRefCount = 0; gSDMountRefCount = 0;
return res; return res;