Use <string.h> & <3ds/exheader.h>, fix some bugs, etc.
also fix all warnings and use -Werror
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "debug.h"
|
||||
#include "memory.h"
|
||||
#include "synchronization.h"
|
||||
|
||||
KRecursiveLock dbgParamsLock = { NULL };
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "fatalExceptionHandlers.h"
|
||||
#include "utils.h"
|
||||
#include "kernel.h"
|
||||
#include "memory.h"
|
||||
#include "globals.h"
|
||||
|
||||
#define REG_DUMP_SIZE 4 * 23
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "ipc.h"
|
||||
#include "memory.h"
|
||||
|
||||
static SessionInfo sessionInfos[MAX_SESSION] = { {NULL} };
|
||||
static u32 nbActiveSessions = 0;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "utils.h"
|
||||
#include "globals.h"
|
||||
#include "synchronization.h"
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "svc.h"
|
||||
#include "svc/ConnectToPort.h"
|
||||
#include "svcHandler.h"
|
||||
#include "memory.h"
|
||||
|
||||
struct KExtParameters
|
||||
{
|
||||
@@ -53,7 +52,7 @@ void relocateAndSetupMMU(u32 coreId, u32 *L1Table)
|
||||
// Relocate ourselves, and clear BSS
|
||||
// This is only OK because the jumps will be relative...
|
||||
memcpy((void *)p0->basePA, (const void *)0x18000000, __bss_start__ - __start__);
|
||||
memset32((u32 *)(p0->basePA + (__bss_start__ - __start__)), 0, __bss_end__ - __bss_start__);
|
||||
memset((u32 *)(p0->basePA + (__bss_start__ - __start__)), 0, __bss_end__ - __bss_start__);
|
||||
|
||||
// Map the kernel ext to 0x40000000
|
||||
// 4KB extended small pages: [SYS:RW USR:-- X TYP:NORMAL SHARED OUTER NOCACHE, INNER CACHED WB WA]
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
|
||||
#include "memory.h"
|
||||
#include <string.h>
|
||||
#include "synchronization.h"
|
||||
#include "svc.h"
|
||||
#include "svc/ControlMemory.h"
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "svc/ConnectToPort.h"
|
||||
#include "memory.h"
|
||||
#include "ipc.h"
|
||||
|
||||
Result ConnectToPortHook(Handle *out, const char *name)
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "svc/ControlService.h"
|
||||
#include "memory.h"
|
||||
#include "ipc.h"
|
||||
|
||||
Result ControlService(ServiceOp op, u32 varg1, u32 varg2)
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "svc/CopyHandle.h"
|
||||
#include "memory.h"
|
||||
|
||||
Result CopyHandle(Handle *outHandle, Handle outProcessHandle, Handle inHandle, Handle inProcessHandle)
|
||||
{
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "svc/GetThreadInfo.h"
|
||||
#include "memory.h"
|
||||
|
||||
Result GetHandleInfoHook(s64 *out, Handle handle, u32 type)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "svc/GetProcessInfo.h"
|
||||
#include "memory.h"
|
||||
#include <string.h>
|
||||
|
||||
Result GetProcessInfoHook(s64 *out, Handle processHandle, u32 type)
|
||||
{
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "svc/GetThreadInfo.h"
|
||||
#include "memory.h"
|
||||
|
||||
Result GetThreadInfoHook(s64 *out, Handle threadHandle, u32 type)
|
||||
{
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "svc/KernelSetState.h"
|
||||
#include "synchronization.h"
|
||||
#include "ipc.h"
|
||||
#include "debug.h"
|
||||
#include "memory.h"
|
||||
|
||||
#define MAX_DEBUG 3
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "svc/SendSyncRequest.h"
|
||||
#include "memory.h"
|
||||
#include "ipc.h"
|
||||
|
||||
Result SendSyncRequestHook(Handle handle)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "svc/TranslateHandle.h"
|
||||
#include "memory.h"
|
||||
#include <string.h>
|
||||
|
||||
Result TranslateHandle(u32 *outKAddr, char *outClassName, Handle handle)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user