mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
[rpcsx-os] shm: do abort on unknown shm open
This commit is contained in:
parent
f65697769b
commit
99a3a4005b
|
|
@ -2,6 +2,7 @@
|
|||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/error/ErrorCode.hpp"
|
||||
#include "orbis/file.hpp"
|
||||
#include "orbis/thread/Thread.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
|
|
@ -31,10 +32,20 @@ orbis::ErrorCode ShmDevice::open(orbis::Ref<orbis::File> *file,
|
|||
// TODO
|
||||
realFlags |= O_CREAT;
|
||||
size = 0x4000;
|
||||
} else if (name == "/rpcsx-vmicDdShmAin") {
|
||||
// TODO
|
||||
realFlags |= O_CREAT;
|
||||
size = 0x4000;
|
||||
} else if (name == "/rpcsx-SceNpPlusLogger") {
|
||||
realFlags |= O_CREAT;
|
||||
size = 0x4400;
|
||||
thread->where();
|
||||
} else if (~flags & 0x200) {
|
||||
ORBIS_LOG_ERROR("SHM: unknown shared memory", path);
|
||||
thread->where();
|
||||
std::abort();
|
||||
}
|
||||
|
||||
realFlags |= O_CREAT; // TODO
|
||||
|
||||
int fd = shm_open(name.c_str(), realFlags, S_IRUSR | S_IWUSR);
|
||||
if (fd < 0) {
|
||||
std::printf("shm_open: error %u\n", errno);
|
||||
|
|
|
|||
Loading…
Reference in a new issue