Skip to content

Commit

Permalink
Removed envGetArgc() and the related code, since it was removed from …
Browse files Browse the repository at this point in the history
…wiki-ABI. Updated a comment in argv.c.
  • Loading branch information
yellows8 committed Feb 17, 2018
1 parent 3f90f3b commit 3c6b8bb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions nx/include/switch/runtime/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ u64 envGetHeapOverrideSize(void);

/// Returns true if the environment has an argv array.
bool envHasArgv(void);
/// Returns the number of arguments in the argv array.
u64 envGetArgc(void);
/// Returns the pointer to the argv array.
void* envGetArgv(void);

Expand Down
2 changes: 1 addition & 1 deletion nx/source/runtime/argv.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void argvSetup(void)
__system_argc = 0;
__system_argv = NULL;

// TODO: Use envHasArgv() here for the NRO case.
// TODO: Use envHasArgv()/envGetArgv() here for the NRO case.

if (envIsNso()) {
memset(&meminfo, 0, sizeof(meminfo));
Expand Down
6 changes: 0 additions & 6 deletions nx/source/runtime/env.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ static Handle g_mainThreadHandle = INVALID_HANDLE;
static LoaderReturnFn g_loaderRetAddr = NULL;
static void* g_overrideHeapAddr = NULL;
static u64 g_overrideHeapSize = 0;
static u64 g_overrideArgc = 0;
static void* g_overrideArgv = NULL;
static u64 g_syscallHints[2];
static Handle g_processHandle = INVALID_HANDLE;
Expand Down Expand Up @@ -69,7 +68,6 @@ void envSetup(void* ctx, Handle main_thread, LoaderReturnFn saved_lr)
break;

case EntryType_Argv:
g_overrideArgc = ent->Value[0];
g_overrideArgv = (void*) ent->Value[1];
break;

Expand Down Expand Up @@ -129,10 +127,6 @@ bool envHasArgv(void) {
return g_overrideArgv != NULL;
}

u64 envGetArgc(void) {
return g_overrideArgc;
}

void* envGetArgv(void) {
return g_overrideArgv;
}
Expand Down

0 comments on commit 3c6b8bb

Please sign in to comment.