fs.mitm: WIP LayeredFS impl (NOTE: UNUSABLE ATM)

Also greatly refactors libstratosphere, and does a lot of other things.
There is a lot of code in this one.
This commit is contained in:
Michael Scire 2018-06-14 17:50:01 -06:00
parent 82b248aeac
commit c2d9ac8f5c
56 changed files with 1615 additions and 243 deletions

View file

@ -1,4 +1,5 @@
#include <switch.h>
#include <stratosphere.hpp>
#include "pm_boot_mode.hpp"
static bool g_is_maintenance_boot = false;

View file

@ -7,7 +7,7 @@ enum BootModeCmd {
BootMode_Cmd_SetMaintenanceBoot = 1
};
class BootModeService final : IServiceObject {
class BootModeService final : public IServiceObject {
public:
Result dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, u8 *pointer_buffer, size_t pointer_buffer_size) override;
Result handle_deferred() override;

View file

@ -1,4 +1,5 @@
#include <switch.h>
#include <stratosphere.hpp>
#include "pm_registration.hpp"
#include "pm_debug_monitor.hpp"

View file

@ -27,7 +27,7 @@ enum DmntCmd_5X {
Dmnt_Cmd_5X_AtmosphereGetProcessHandle = 65000
};
class DebugMonitorService final : IServiceObject {
class DebugMonitorService final : public IServiceObject {
public:
Result dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, u8 *pointer_buffer, size_t pointer_buffer_size) override;
Result handle_deferred() override;

View file

@ -1,12 +1,13 @@
#pragma once
#include <switch.h>
#include <stratosphere.hpp>
#include <stratosphere/iserviceobject.hpp>
enum InformationCmd {
Information_Cmd_GetTitleId = 0,
};
class InformationService final : IServiceObject {
class InformationService final : public IServiceObject {
public:
Result dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, u8 *pointer_buffer, size_t pointer_buffer_size) override;
Result handle_deferred() override;

View file

@ -18,19 +18,7 @@ class ProcessWaiter final : public IWaitable {
return &this->process;
}
/* IWaitable */
unsigned int get_num_waitables() override {
return 1;
}
void get_waitables(IWaitable **dst) override {
dst[0] = this;
}
void delete_child(IWaitable *child) override {
/* TODO: Panic, because we can never have any children. */
}
/* IWaitable */
Handle get_handle() override {
return this->process.handle;
}

View file

@ -1,4 +1,5 @@
#include <switch.h>
#include <stratosphere.hpp>
#include "pm_registration.hpp"
#include "pm_resource_limits.hpp"
#include "pm_shell.hpp"

View file

@ -30,7 +30,7 @@ enum ShellCmd_5X {
Shell_Cmd_5X_BoostSystemMemoryResourceLimit = 7
};
class ShellService final : IServiceObject {
class ShellService final : public IServiceObject {
public:
Result dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, u8 *pointer_buffer, size_t pointer_buffer_size) override;
Result handle_deferred() override;