|
|
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 |
|
|
|
26e14f |
int ntux_entry_point(void)
|
|
|
26e14f |
{
|
|
|
26e14f |
int argc;
|
|
|
26e14f |
char ** argv;
|
|
|
26e14f |
char ** envp;
|
|
|
719722 |
struct __psx_context ctx = {0,0,0,0,0,0,0,0,0,0,0,0};
|
|
|
26e14f |
|
|
|
26e14f |
/* ctx */
|
|
|
26e14f |
ctx.size = sizeof(ctx);
|
|
|
26e14f |
|
|
|
26e14f |
/* __psx_init must succeed... */
|
|
|
26e14f |
if (__psx_init(&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 |
}
|