mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-07 15:36:26 +00:00
[rpcsx-os] stub /dev/mbus and /dev/notification*
This commit is contained in:
parent
4762166cc4
commit
9865be85af
7 changed files with 98 additions and 4 deletions
38
rpcsx-os/iodev/notification.cpp
Normal file
38
rpcsx-os/iodev/notification.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/file.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
|
||||
struct NotificationFile : orbis::File {};
|
||||
struct NotificationDevice : IoDevice {
|
||||
int index;
|
||||
|
||||
NotificationDevice(int index) : index(index) {}
|
||||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path,
|
||||
std::uint32_t flags, std::uint32_t mode,
|
||||
orbis::Thread *thread) override;
|
||||
};
|
||||
|
||||
static orbis::ErrorCode notification_ioctl(orbis::File *file, std::uint64_t request,
|
||||
void *argp, orbis::Thread *thread) {
|
||||
|
||||
ORBIS_LOG_FATAL("Unhandled notification ioctl", request);
|
||||
return {};
|
||||
}
|
||||
|
||||
static const orbis::FileOps fileOps = {
|
||||
.ioctl = notification_ioctl,
|
||||
};
|
||||
|
||||
orbis::ErrorCode NotificationDevice::open(orbis::Ref<orbis::File> *file, const char *path,
|
||||
std::uint32_t flags, std::uint32_t mode,
|
||||
orbis::Thread *thread) {
|
||||
auto newFile = orbis::knew<NotificationFile>();
|
||||
newFile->ops = &fileOps;
|
||||
newFile->device = this;
|
||||
|
||||
*file = newFile;
|
||||
return {};
|
||||
}
|
||||
|
||||
IoDevice *createNotificationCharacterDevice(int index) { return orbis::knew<NotificationDevice>(index); }
|
||||
Loading…
Add table
Add a link
Reference in a new issue