Better cellNetCtlGetInfo logging

Also added back some more logging in cellSaveData, but this time only
printed as warnings.
This commit is contained in:
Raul Tambre 2015-07-24 13:33:29 +03:00 committed by Nekotekina
parent e47493e81b
commit 9ecedfdf3c
3 changed files with 37 additions and 1 deletions

View File

@ -104,7 +104,7 @@ s32 cellNetCtlDelHandler(s32 hid)
s32 cellNetCtlGetInfo(s32 code, vm::ptr<CellNetCtlInfo> info)
{
cellNetCtl.Todo("cellNetCtlGetInfo(code=0x%x, info=*0x%x)", code, info);
cellNetCtl.Todo("cellNetCtlGetInfo(code=0x%x (%s), info=*0x%x)", code, InfoCodeToName(code), info);
if (code == CELL_NET_CTL_INFO_IP_ADDRESS)
{

View File

@ -260,3 +260,35 @@ struct CellNetCtlNatInfo
};
typedef void(cellNetCtlHandler)(s32 prev_state, s32 new_state, s32 event, s32 error_code, vm::ptr<u32> arg);
inline static const char* InfoCodeToName(s32 code)
{
static const char* const names[] =
{
"INFO_DEVICE",
"INFO_ETHER_ADDR",
"INFO_MTU",
"INFO_LINK",
"INFO_LINK_TYPE",
"INFO_BSSID",
"INFO_SSID",
"INFO_WLAN_SECURITY",
"INFO_8021X_TYPE",
"INFO_8021X_AUTH_NAME",
"INFO_RSSI",
"INFO_CHANNEL",
"INFO_IP_CONFIG",
"INFO_DHCP_HOSTNAME",
"INFO_PPPOE_AUTH_NAME",
"INFO_IP_ADDRESS",
"INFO_DEFAULT_ROUTE",
"INFO_PRIMARY_DNS",
"INFO_SECONDARY_DNS",
"INFO_HTTP_PROXY_CONFIG",
"INFO_HTTP_PROXY_SERVER",
"INFO_HTTP_PROXY_PORT",
"INFO_UPNP_CONFIG",
};
return names[code - 1];
}

View File

@ -191,6 +191,7 @@ never_inline s32 savedata_op(
if (result->result < 0)
{
cellSysutil.Warning("savedata_op(): funcList returned < 0.");
return CELL_SAVEDATA_ERROR_CBRESULT;
}
@ -302,6 +303,7 @@ never_inline s32 savedata_op(
if (result->result < 0)
{
cellSysutil.Warning("savedata_op(): funcFixed returned < 0.");
return CELL_SAVEDATA_ERROR_CBRESULT;
}
@ -436,6 +438,7 @@ never_inline s32 savedata_op(
if (result->result < 0)
{
cellSysutil.Warning("savedata_op(): funcStat returned < 0.");
return CELL_SAVEDATA_ERROR_CBRESULT;
}
@ -504,6 +507,7 @@ never_inline s32 savedata_op(
if (result->result < 0)
{
cellSysutil.Warning("savedata_op(): funcFile returned < 0.");
return CELL_SAVEDATA_ERROR_CBRESULT;
}