Silence some log messages

This commit is contained in:
Eladash 2019-12-20 09:17:22 +02:00 committed by Ivan
parent 9690854e58
commit 71c4a2a15f
9 changed files with 54 additions and 46 deletions

View file

@ -587,7 +587,7 @@ error_code cellCameraGetType(s32 dev_num, vm::ptr<s32> type)
s32 cellCameraIsAvailable(s32 dev_num)
{
cellCamera.todo("cellCameraIsAvailable(dev_num=%d)", dev_num);
cellCamera.warning("cellCameraIsAvailable(dev_num=%d)", dev_num);
if (g_cfg.io.camera == camera_handler::null)
{
@ -611,7 +611,7 @@ s32 cellCameraIsAvailable(s32 dev_num)
s32 cellCameraIsAttached(s32 dev_num)
{
cellCamera.todo("cellCameraIsAttached(dev_num=%d)", dev_num);
cellCamera.warning("cellCameraIsAttached(dev_num=%d)", dev_num);
if (g_cfg.io.camera == camera_handler::null)
{
@ -650,7 +650,7 @@ s32 cellCameraIsAttached(s32 dev_num)
s32 cellCameraIsOpen(s32 dev_num)
{
cellCamera.todo("cellCameraIsOpen(dev_num=%d)", dev_num);
cellCamera.warning("cellCameraIsOpen(dev_num=%d)", dev_num);
if (g_cfg.io.camera == camera_handler::null)
{
@ -674,9 +674,9 @@ s32 cellCameraIsOpen(s32 dev_num)
return g_camera->is_open;
}
error_code cellCameraIsStarted(s32 dev_num)
s32 cellCameraIsStarted(s32 dev_num)
{
cellCamera.todo("cellCameraIsStarted(dev_num=%d)", dev_num);
cellCamera.warning("cellCameraIsStarted(dev_num=%d)", dev_num);
if (g_cfg.io.camera == camera_handler::null)
{

View file

@ -732,7 +732,7 @@ error_code cellGemGetImageState(u32 gem_num, vm::ptr<CellGemImageState> gem_imag
error_code cellGemGetInertialState(u32 gem_num, u32 state_flag, u64 timestamp, vm::ptr<CellGemInertialState> inertial_state)
{
cellGem.todo("cellGemGetInertialState(gem_num=%d, state_flag=%d, timestamp=0x%x, inertial_state=0x%x)", gem_num, state_flag, timestamp, inertial_state);
cellGem.warning("cellGemGetInertialState(gem_num=%d, state_flag=%d, timestamp=0x%x, inertial_state=0x%x)", gem_num, state_flag, timestamp, inertial_state);
const auto gem = g_fxo->get<gem_config>();
@ -767,7 +767,7 @@ error_code cellGemGetInertialState(u32 gem_num, u32 state_flag, u64 timestamp, v
error_code cellGemGetInfo(vm::ptr<CellGemInfo> info)
{
cellGem.todo("cellGemGetInfo(info=*0x%x)", info);
cellGem.warning("cellGemGetInfo(info=*0x%x)", info);
const auto gem = g_fxo->get<gem_config>();
@ -864,7 +864,7 @@ error_code cellGemGetRumble(u32 gem_num, vm::ptr<u8> rumble)
error_code cellGemGetState(u32 gem_num, u32 flag, u64 time_parameter, vm::ptr<CellGemState> gem_state)
{
cellGem.todo("cellGemGetState(gem_num=%d, flag=0x%x, time=0x%llx, gem_state=*0x%x)", gem_num, flag, time_parameter, gem_state);
cellGem.warning("cellGemGetState(gem_num=%d, flag=0x%x, time=0x%llx, gem_state=*0x%x)", gem_num, flag, time_parameter, gem_state);
const auto gem = g_fxo->get<gem_config>();
@ -1247,7 +1247,7 @@ error_code cellGemTrackHues(vm::cptr<u32> req_hues, vm::ptr<u32> res_hues)
error_code cellGemUpdateFinish()
{
cellGem.todo("cellGemUpdateFinish()");
cellGem.warning("cellGemUpdateFinish()");
const auto gem = g_fxo->get<gem_config>();
@ -1265,7 +1265,7 @@ error_code cellGemUpdateFinish()
if (!gem->camera_frame)
{
return CELL_GEM_NO_VIDEO;
return not_an_error(CELL_GEM_NO_VIDEO);
}
return CELL_OK;
@ -1273,7 +1273,7 @@ error_code cellGemUpdateFinish()
error_code cellGemUpdateStart(vm::cptr<void> camera_frame, u64 timestamp)
{
cellGem.todo("cellGemUpdateStart(camera_frame=*0x%x, timestamp=%d)", camera_frame, timestamp);
cellGem.warning("cellGemUpdateStart(camera_frame=*0x%x, timestamp=%d)", camera_frame, timestamp);
const auto gem = g_fxo->get<gem_config>();
@ -1293,7 +1293,7 @@ error_code cellGemUpdateStart(vm::cptr<void> camera_frame, u64 timestamp)
gem->camera_frame = camera_frame.addr();
if (!camera_frame)
{
return CELL_GEM_NO_VIDEO;
return not_an_error(CELL_GEM_NO_VIDEO);
}
return CELL_OK;

View file

@ -300,7 +300,7 @@ error_code cellNetCtlNetStartDialogUnloadAsync(vm::ptr<CellNetCtlNetStartDialogR
error_code cellNetCtlGetNatInfo(vm::ptr<CellNetCtlNatInfo> natInfo)
{
cellNetCtl.todo("cellNetCtlGetNatInfo(natInfo=*0x%x)", natInfo);
cellNetCtl.warning("cellNetCtlGetNatInfo(natInfo=*0x%x)", natInfo);
if (!g_fxo->get<cell_net_ctl_manager>()->is_initialized)
{

View file

@ -750,7 +750,7 @@ error_code sceNpBasicSendMessageGui(vm::cptr<SceNpBasicMessageDetails> msg, sys_
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_BASIC_ERROR_NOT_CONNECTED;
return not_an_error(SCE_NP_BASIC_ERROR_NOT_CONNECTED);
}
return CELL_OK;
@ -777,7 +777,7 @@ error_code sceNpBasicSendMessageAttachment(vm::cptr<SceNpId> to, vm::cptr<char>
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_BASIC_ERROR_NOT_CONNECTED;
return not_an_error(SCE_NP_BASIC_ERROR_NOT_CONNECTED);
}
return CELL_OK;
@ -884,7 +884,7 @@ error_code sceNpBasicAddFriend(vm::cptr<SceNpId> contact, vm::cptr<char> body, s
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_BASIC_ERROR_NOT_CONNECTED;
return not_an_error(SCE_NP_BASIC_ERROR_NOT_CONNECTED);
}
return CELL_OK;
@ -1102,7 +1102,7 @@ error_code sceNpBasicGetPlayersHistoryEntryCount(u32 options, vm::ptr<u32> count
error_code sceNpBasicGetPlayersHistoryEntry(u32 options, u32 index, vm::ptr<SceNpId> npid)
{
sceNp.todo("sceNpBasicGetPlayersHistoryEntry(options=%d, index=%d, npid=*0x%x)", options, index, npid);
sceNp.warning("sceNpBasicGetPlayersHistoryEntry(options=%d, index=%d, npid=*0x%x)", options, index, npid);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -1126,7 +1126,7 @@ error_code sceNpBasicGetPlayersHistoryEntry(u32 options, u32 index, vm::ptr<SceN
error_code sceNpBasicAddBlockListEntry(vm::cptr<SceNpId> npid)
{
sceNp.todo("sceNpBasicAddBlockListEntry(npid=*0x%x)", npid);
sceNp.warning("sceNpBasicAddBlockListEntry(npid=*0x%x)", npid);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -1140,7 +1140,7 @@ error_code sceNpBasicAddBlockListEntry(vm::cptr<SceNpId> npid)
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_BASIC_ERROR_NOT_CONNECTED;
return not_an_error(SCE_NP_BASIC_ERROR_NOT_CONNECTED);
}
return CELL_OK;
@ -1148,7 +1148,7 @@ error_code sceNpBasicAddBlockListEntry(vm::cptr<SceNpId> npid)
error_code sceNpBasicGetBlockListEntryCount(vm::ptr<u32> count)
{
sceNp.todo("sceNpBasicGetBlockListEntryCount(count=*0x%x)", count);
sceNp.warning("sceNpBasicGetBlockListEntryCount(count=*0x%x)", count);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -1438,7 +1438,7 @@ error_code sceNpBasicGetMessageEntry(u32 type, u32 index, vm::ptr<SceNpUserInfo>
error_code sceNpBasicGetEvent(vm::ptr<s32> event, vm::ptr<SceNpUserInfo> from, vm::ptr<s32> data, vm::ptr<u32> size)
{
sceNp.todo("sceNpBasicGetEvent(event=*0x%x, from=*0x%x, data=*0x%x, size=*0x%x)", event, from, data, size);
sceNp.warning("sceNpBasicGetEvent(event=*0x%x, from=*0x%x, data=*0x%x, size=*0x%x)", event, from, data, size);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -1453,7 +1453,7 @@ error_code sceNpBasicGetEvent(vm::ptr<s32> event, vm::ptr<SceNpUserInfo> from, v
// TODO: Check for other error and pass other events
//*event = SCE_NP_BASIC_EVENT_OFFLINE; // This event only indicates a contact is offline, not the current status of the connection
return SCE_NP_BASIC_ERROR_NO_EVENT;
return not_an_error(SCE_NP_BASIC_ERROR_NO_EVENT);
}
error_code sceNpCommerceCreateCtx(u32 version, vm::ptr<SceNpId> npId, vm::ptr<SceNpCommerceHandler> handler, vm::ptr<void> arg, vm::ptr<u32> ctx_id)
@ -1729,7 +1729,7 @@ error_code sceNpCustomMenuRegisterExceptionList(vm::cptr<SceNpCustomMenuActionEx
error_code sceNpFriendlist(vm::ptr<SceNpFriendlistResultHandler> resultHandler, vm::ptr<void> userArg, sys_memory_container_t containerId)
{
sceNp.todo("sceNpFriendlist(resultHandler=*0x%x, userArg=*0x%x, containerId=%d)", resultHandler, userArg, containerId);
sceNp.warning("sceNpFriendlist(resultHandler=*0x%x, userArg=*0x%x, containerId=%d)", resultHandler, userArg, containerId);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -1746,7 +1746,7 @@ error_code sceNpFriendlist(vm::ptr<SceNpFriendlistResultHandler> resultHandler,
error_code sceNpFriendlistCustom(SceNpFriendlistCustomOptions options, vm::ptr<SceNpFriendlistResultHandler> resultHandler, vm::ptr<void> userArg, sys_memory_container_t containerId)
{
sceNp.todo("sceNpFriendlistCustom(options=0x%x, resultHandler=*0x%x, userArg=*0x%x, containerId=%d)", options, resultHandler, userArg, containerId);
sceNp.warning("sceNpFriendlistCustom(options=0x%x, resultHandler=*0x%x, userArg=*0x%x, containerId=%d)", options, resultHandler, userArg, containerId);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -2272,7 +2272,7 @@ error_code sceNpManagerUnregisterCallback()
error_code sceNpManagerGetStatus(vm::ptr<s32> status)
{
sceNp.todo("sceNpManagerGetStatus(status=*0x%x)", status);
sceNp.warning("sceNpManagerGetStatus(status=*0x%x)", status);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -2376,7 +2376,7 @@ error_code sceNpManagerGetNpId(ppu_thread& ppu, vm::ptr<SceNpId> npId)
error_code sceNpManagerGetOnlineName(vm::ptr<SceNpOnlineName> onlineName)
{
sceNp.todo("sceNpManagerGetOnlineName(onlineName=*0x%x)", onlineName);
sceNp.warning("sceNpManagerGetOnlineName(onlineName=*0x%x)", onlineName);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -2403,7 +2403,7 @@ error_code sceNpManagerGetOnlineName(vm::ptr<SceNpOnlineName> onlineName)
error_code sceNpManagerGetAvatarUrl(vm::ptr<SceNpAvatarUrl> avatarUrl)
{
sceNp.todo("sceNpManagerGetAvatarUrl(avatarUrl=*0x%x)", avatarUrl);
sceNp.warning("sceNpManagerGetAvatarUrl(avatarUrl=*0x%x)", avatarUrl);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -2430,7 +2430,7 @@ error_code sceNpManagerGetAvatarUrl(vm::ptr<SceNpAvatarUrl> avatarUrl)
error_code sceNpManagerGetMyLanguages(vm::ptr<SceNpMyLanguages> myLanguages)
{
sceNp.todo("sceNpManagerGetMyLanguages(myLanguages=*0x%x)", myLanguages);
sceNp.warning("sceNpManagerGetMyLanguages(myLanguages=*0x%x)", myLanguages);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -2457,7 +2457,7 @@ error_code sceNpManagerGetMyLanguages(vm::ptr<SceNpMyLanguages> myLanguages)
error_code sceNpManagerGetAccountRegion(vm::ptr<SceNpCountryCode> countryCode, vm::ptr<s32> language)
{
sceNp.todo("sceNpManagerGetAccountRegion(countryCode=*0x%x, language=*0x%x)", countryCode, language);
sceNp.warning("sceNpManagerGetAccountRegion(countryCode=*0x%x, language=*0x%x)", countryCode, language);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -2484,7 +2484,7 @@ error_code sceNpManagerGetAccountRegion(vm::ptr<SceNpCountryCode> countryCode, v
error_code sceNpManagerGetAccountAge(vm::ptr<s32> age)
{
sceNp.todo("sceNpManagerGetAccountAge(age=*0x%x)", age);
sceNp.warning("sceNpManagerGetAccountAge(age=*0x%x)", age);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -2511,7 +2511,7 @@ error_code sceNpManagerGetAccountAge(vm::ptr<s32> age)
error_code sceNpManagerGetContentRatingFlag(vm::ptr<s32> isRestricted, vm::ptr<s32> age)
{
sceNp.todo("sceNpManagerGetContentRatingFlag(isRestricted=*0x%x, age=*0x%x)", isRestricted, age);
sceNp.warning("sceNpManagerGetContentRatingFlag(isRestricted=*0x%x, age=*0x%x)", isRestricted, age);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -2542,7 +2542,7 @@ error_code sceNpManagerGetContentRatingFlag(vm::ptr<s32> isRestricted, vm::ptr<s
error_code sceNpManagerGetChatRestrictionFlag(vm::ptr<s32> isRestricted)
{
sceNp.todo("sceNpManagerGetChatRestrictionFlag(isRestricted=*0x%x)", isRestricted);
sceNp.warning("sceNpManagerGetChatRestrictionFlag(isRestricted=*0x%x)", isRestricted);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
@ -4285,7 +4285,7 @@ error_code sceNpUtilCmpNpId(vm::ptr<SceNpId> id1, vm::ptr<SceNpId> id2)
error_code sceNpUtilCmpNpIdInOrder(vm::cptr<SceNpId> id1, vm::cptr<SceNpId> id2, vm::ptr<s32> order)
{
sceNp.todo("sceNpUtilCmpNpIdInOrder(id1=*0x%x, id2=*0x%x, order=*0x%x)", id1, id2, order);
sceNp.warning("sceNpUtilCmpNpIdInOrder(id1=*0x%x, id2=*0x%x, order=*0x%x)", id1, id2, order);
if (!id1 || !id2)
{
@ -4332,7 +4332,7 @@ error_code sceNpUtilCmpNpIdInOrder(vm::cptr<SceNpId> id1, vm::cptr<SceNpId> id2,
error_code sceNpUtilCmpOnlineId(vm::cptr<SceNpId> id1, vm::cptr<SceNpId> id2)
{
sceNp.todo("sceNpUtilCmpOnlineId(id1=*0x%x, id2=*0x%x)", id1, id2);
sceNp.warning("sceNpUtilCmpOnlineId(id1=*0x%x, id2=*0x%x)", id1, id2);
if (!id1 || !id2)
{
@ -4354,7 +4354,7 @@ error_code sceNpUtilCmpOnlineId(vm::cptr<SceNpId> id1, vm::cptr<SceNpId> id2)
error_code sceNpUtilGetPlatformType(vm::cptr<SceNpId> npId)
{
sceNp.todo("sceNpUtilGetPlatformType(npId=*0x%x)", npId);
sceNp.warning("sceNpUtilGetPlatformType(npId=*0x%x)", npId);
if (!npId)
{
@ -4380,7 +4380,7 @@ error_code sceNpUtilGetPlatformType(vm::cptr<SceNpId> npId)
error_code sceNpUtilSetPlatformType(vm::ptr<SceNpId> npId, SceNpPlatformType platformType)
{
sceNp.todo("sceNpUtilSetPlatformType(npId=*0x%x, platformType=%d)", npId, platformType);
sceNp.warning("sceNpUtilSetPlatformType(npId=*0x%x, platformType=%d)", npId, platformType);
if (!npId)
{

View file

@ -184,7 +184,7 @@ error_code sceNpSnsFbGetAccessToken(u32 handle, vm::cptr<SceNpSnsFbAccessTokenPa
if (g_psn_connection_status == SCE_NP_MANAGER_STATUS_OFFLINE)
{
return SCE_NP_SNS_ERROR_NOT_SIGN_IN;
return not_an_error(SCE_NP_SNS_ERROR_NOT_SIGN_IN);
}
// TODO
@ -309,7 +309,7 @@ error_code sceNpSnsFbGetLongAccessToken(u32 handle, vm::cptr<SceNpSnsFbAccessTok
if (g_psn_connection_status == SCE_NP_MANAGER_STATUS_OFFLINE)
{
return SCE_NP_SNS_ERROR_NOT_SIGN_IN;
return not_an_error(SCE_NP_SNS_ERROR_NOT_SIGN_IN);
}
return CELL_OK;

View file

@ -130,7 +130,7 @@ error_code sys_mmapper_allocate_shared_memory_from_container(ppu_thread& ppu, u6
{
vm::temporary_unlock(ppu);
sys_mmapper.error("sys_mmapper_allocate_shared_memory_from_container(0x%llx, size=0x%x, cid=0x%x, flags=0x%llx, mem_id=*0x%x)", unk, size, cid, flags, mem_id);
sys_mmapper.warning("sys_mmapper_allocate_shared_memory_from_container(0x%llx, size=0x%x, cid=0x%x, flags=0x%llx, mem_id=*0x%x)", unk, size, cid, flags, mem_id);
// Check page granularity.
switch (flags & SYS_MEMORY_PAGE_SIZE_MASK)

View file

@ -134,7 +134,7 @@ error_code sys_ppu_thread_join(ppu_thread& ppu, u32 thread_id, vm::ptr<u64> vptr
if (!vptr)
{
return CELL_EFAULT;
return not_an_error(CELL_EFAULT);
}
// Get the exit status from the register

View file

@ -311,7 +311,7 @@ error_code sys_spu_thread_initialize(ppu_thread& ppu, vm::ptr<u32> thread, u32 g
if (u32 option = attr->option)
{
sys_spu.todo("Unimplemented SPU Thread options (0x%x)", option);
sys_spu.warning("Unimplemented SPU Thread options (0x%x)", option);
}
const vm::addr_t ls_addr{verify("SPU LS" HERE, vm::alloc(0x80000, vm::main))};
@ -418,7 +418,7 @@ error_code sys_spu_thread_group_create(ppu_thread& ppu, vm::ptr<u32> id, u32 num
if (attr->type)
{
sys_spu.todo("Unsupported SPU Thread Group type (0x%x)", attr->type);
sys_spu.warning("sys_spu_thread_group_create(): SPU Thread Group type (0x%x)", attr->type);
}
*id = idm::make<lv2_spu_group>(std::string(attr->name.get_ptr(), std::max<u32>(attr->nsize, 1) - 1), num, prio, attr->type, attr->ct);
@ -784,14 +784,20 @@ error_code sys_spu_thread_group_join(ppu_thread& ppu, u32 id, vm::ptr<u32> cause
if (!cause)
{
return CELL_EFAULT;
if (status)
{
// Report unwritten data
return CELL_EFAULT;
}
return not_an_error(CELL_EFAULT);
}
*cause = static_cast<u32>(ppu.gpr[4]);
if (!status)
{
return CELL_EFAULT;
return not_an_error(CELL_EFAULT);
}
*status = static_cast<s32>(ppu.gpr[5]);

View file

@ -88,6 +88,8 @@ error_code sys_tty_read(s32 ch, vm::ptr<char> buf, u32 len, vm::ptr<u32> preadle
error_code sys_tty_write(s32 ch, vm::cptr<char> buf, u32 len, vm::ptr<u32> pwritelen)
{
sys_tty.notice("sys_tty_write(ch=%d, buf=*0x%x, len=%d, pwritelen=*0x%x)", ch, buf, len, pwritelen);
std::string msg;
if (static_cast<s32>(len) > 0 && vm::check_addr(buf.addr(), len))
@ -100,8 +102,6 @@ error_code sys_tty_write(s32 ch, vm::cptr<char> buf, u32 len, vm::ptr<u32> pwrit
}
}
sys_tty.notice("sys_tty_write(ch=%d, buf=*0x%x (“%s”), len=%d, pwritelen=*0x%x)", ch, buf, msg, len, pwritelen);
// Hack: write to tty even on CEX mode, but disable all error checks
if (ch < 0 || ch > 15)
{
@ -125,6 +125,8 @@ error_code sys_tty_write(s32 ch, vm::cptr<char> buf, u32 len, vm::ptr<u32> pwrit
{
if (!msg.empty())
{
sys_tty.notice("sys_tty_write(): “%s”", msg);
if (g_tty)
{
// Lock size by making it negative