Files | |
file | main.c |
Loads and runs programs from VFS. | |
Defines | |
#define | DPRINTF() |
Functions | |
static void | ldr_connection (ipc_callid_t iid, ipc_call_t *icall) |
Handle loader connection. | |
static void | ldr_get_taskid (ipc_callid_t rid, ipc_call_t *request) |
static int | ldr_load (ipc_callid_t rid, ipc_call_t *request) |
Load the previously selected program. | |
static void | ldr_run (ipc_callid_t rid, ipc_call_t *request) |
Run the previously loaded program. | |
static void | ldr_set_args (ipc_callid_t rid, ipc_call_t *request) |
Receive a call setting arguments of the program to execute. | |
static void | ldr_set_cwd (ipc_callid_t rid, ipc_call_t *request) |
Receive a call setting the current working directory. | |
static void | ldr_set_files (ipc_callid_t rid, ipc_call_t *request) |
Receive a call setting preset files of the program to execute. | |
static void | ldr_set_pathname (ipc_callid_t rid, ipc_call_t *request) |
Receive a call setting pathname of the program to execute. | |
int | main (int argc, char *argv[]) |
Main entry point. | |
Variables | |
static char * | arg_buf = NULL |
Buffer holding all arguments. | |
static int | argc = 0 |
Number of arguments. | |
static char ** | argv = NULL |
Argument vector. | |
static bool | connected = false |
Used to limit number of connections to one. | |
static char * | cwd = NULL |
Current working directory. | |
static fdi_node_t * | fil_buf = NULL |
Buffer holding all preset files. | |
static int | filc = 0 |
Number of preset files. | |
static fdi_node_t ** | filv = NULL |
Preset files vector. | |
static char * | pathname = NULL |
Pathname of the file that will be loaded. | |
static pcb_t | pcb |
The Program control block. | |
static elf_info_t | prog_info |
static void ldr_connection | ( | ipc_callid_t | iid, | |
ipc_call_t * | icall | |||
) | [static] |
static int ldr_load | ( | ipc_callid_t | rid, | |
ipc_call_t * | request | |||
) | [static] |
static void ldr_run | ( | ipc_callid_t | rid, | |
ipc_call_t * | request | |||
) | [static] |
static void ldr_set_args | ( | ipc_callid_t | rid, | |
ipc_call_t * | request | |||
) | [static] |
static void ldr_set_cwd | ( | ipc_callid_t | rid, | |
ipc_call_t * | request | |||
) | [static] |
static void ldr_set_files | ( | ipc_callid_t | rid, | |
ipc_call_t * | request | |||
) | [static] |
static void ldr_set_pathname | ( | ipc_callid_t | rid, | |
ipc_call_t * | request | |||
) | [static] |
int main | ( | int | argc, | |
char * | argv[] | |||
) |