mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-08 07:55:35 +00:00
[rpcsx-os] stub console, npdrm and icc_configuration devices
This commit is contained in:
parent
738a760fbe
commit
35ba07f676
6 changed files with 105 additions and 0 deletions
32
rpcsx-os/iodev/console.cpp
Normal file
32
rpcsx-os/iodev/console.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#include "io-device.hpp"
|
||||
#include "orbis/KernelAllocator.hpp"
|
||||
#include "orbis/file.hpp"
|
||||
#include "orbis/utils/Logs.hpp"
|
||||
|
||||
struct ConsoleFile : orbis::File {};
|
||||
|
||||
static orbis::ErrorCode console_ioctl(orbis::File *file, std::uint64_t request,
|
||||
void *argp, orbis::Thread *thread) {
|
||||
|
||||
ORBIS_LOG_FATAL("Unhandled console ioctl", request);
|
||||
return {};
|
||||
}
|
||||
|
||||
static const orbis::FileOps fileOps = {
|
||||
.ioctl = console_ioctl,
|
||||
};
|
||||
|
||||
struct ConsoleDevice : IoDevice {
|
||||
orbis::ErrorCode open(orbis::Ref<orbis::File> *file, const char *path,
|
||||
std::uint32_t flags, std::uint32_t mode,
|
||||
orbis::Thread *thread) override {
|
||||
auto newFile = orbis::knew<ConsoleFile>();
|
||||
newFile->ops = &fileOps;
|
||||
newFile->device = this;
|
||||
|
||||
*file = newFile;
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
IoDevice *createConsoleCharacterDevice() { return orbis::knew<ConsoleDevice>(); }
|
||||
Loading…
Add table
Add a link
Reference in a new issue