|
|
26e14f |
/***********************************************************/
|
|
|
26e14f |
/* ntux: native translation und extension */
|
|
|
db57dd |
/* Copyright (C) 2016--2018 Z. Gilboa */
|
|
|
26e14f |
/* Released under GPLv2 and GPLv3; see COPYING.NTUX. */
|
|
|
26e14f |
/***********************************************************/
|
|
|
26e14f |
|
|
|
26e14f |
#include <psxabi/sys_sysapi.h>
|
|
|
26e14f |
#include <ntux/ntux.h>
|
|
|
26e14f |
#include "ntux_driver_impl.h"
|
|
|
26e14f |
|
|
|
407aec |
int ntux_entry_routine(
|
|
|
407aec |
int(*__psx_init_routine)(int *,char ***,char ***,void *),
|
|
|
407aec |
struct __psx_context * ctx)
|
|
|
26e14f |
{
|
|
|
26e14f |
int argc;
|
|
|
26e14f |
char ** argv;
|
|
|
26e14f |
char ** envp;
|
|
|
26e14f |
|
|
|
26e14f |
/* __psx_init must succeed... */
|
|
|
407aec |
if (__psx_init_routine(&argc,&argv,&envp,ctx))
|
|
|
26e14f |
return -1;
|
|
|
26e14f |
|
|
|
26e14f |
/* ...and conform */
|
|
|
26e14f |
else if (envp != argv + (argc + 1))
|
|
|
26e14f |
return -1;
|
|
|
26e14f |
|
|
|
26e14f |
/* invoke main */
|
|
|
26e14f |
__sys_exit_group(
|
|
|
26e14f |
ntux_main(argc,argv,envp));
|
|
|
26e14f |
|
|
|
26e14f |
return NT_STATUS_INTERNAL_ERROR;
|
|
|
26e14f |
}
|