mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 07:21:25 +12:00
cellSysCacheMount: don't return RET_OK_RELAYED on empty cacheId
The system cache is supposed to be cleared but I don't think we wanna do that
This commit is contained in:
parent
4a1499e0be
commit
d4888a4973
1 changed files with 6 additions and 4 deletions
|
@ -297,7 +297,6 @@ s32 cellSysutilUnregisterCallback(u32 slot)
|
||||||
|
|
||||||
s32 cellSysCacheClear()
|
s32 cellSysCacheClear()
|
||||||
{
|
{
|
||||||
|
|
||||||
cellSysutil.warning("cellSysCacheClear()");
|
cellSysutil.warning("cellSysCacheClear()");
|
||||||
|
|
||||||
// Get the param as a shared ptr, then decipher the cacheid from it
|
// Get the param as a shared ptr, then decipher the cacheid from it
|
||||||
|
@ -329,15 +328,18 @@ s32 cellSysCacheMount(vm::ptr<CellSysCacheParam> param)
|
||||||
{
|
{
|
||||||
cellSysutil.warning("cellSysCacheMount(param=*0x%x)", param);
|
cellSysutil.warning("cellSysCacheMount(param=*0x%x)", param);
|
||||||
|
|
||||||
const std::string& cache_id = param->cacheId;
|
if (!param || !memchr(param->cacheId, '\0', CELL_SYSCACHE_ID_SIZE))
|
||||||
verify(HERE), cache_id.size() < sizeof(param->cacheId);
|
{
|
||||||
|
return CELL_SYSCACHE_ERROR_PARAM;
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::string& cache_id = param->cacheId;
|
||||||
const std::string& cache_path = "/dev_hdd1/cache/" + cache_id;
|
const std::string& cache_path = "/dev_hdd1/cache/" + cache_id;
|
||||||
strcpy_trunc(param->getCachePath, cache_path);
|
strcpy_trunc(param->getCachePath, cache_path);
|
||||||
|
|
||||||
// TODO: implement (what?)
|
// TODO: implement (what?)
|
||||||
fxm::make_always<CellSysCacheParam>(*param);
|
fxm::make_always<CellSysCacheParam>(*param);
|
||||||
if (!fs::create_dir(vfs::get(cache_path)))
|
if (!fs::create_dir(vfs::get(cache_path)) && !cache_id.empty())
|
||||||
{
|
{
|
||||||
return CELL_SYSCACHE_RET_OK_RELAYED;
|
return CELL_SYSCACHE_RET_OK_RELAYED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue