Loader

Loads and runs programs from VFS. More...


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_tfil_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

Detailed Description

Loads and runs programs from VFS.


Function Documentation

static void ldr_connection ( ipc_callid_t  iid,
ipc_call_t icall 
) [static]

Handle loader connection.

Receive and carry out commands (of which the last one should be to execute the loaded program).

Definition at line 414 of file main.c.

static int ldr_load ( ipc_callid_t  rid,
ipc_call_t request 
) [static]

Load the previously selected program.

Parameters:
rid 
request 
Returns:
0 on success, !0 on error.

Definition at line 293 of file main.c.

static void ldr_run ( ipc_callid_t  rid,
ipc_call_t request 
) [static]

Run the previously loaded program.

Parameters:
rid 
request 
Returns:
0 on success, !0 on error.

Definition at line 389 of file main.c.

static void ldr_set_args ( ipc_callid_t  rid,
ipc_call_t request 
) [static]

Receive a call setting arguments of the program to execute.

Parameters:
rid 
request 

Definition at line 176 of file main.c.

static void ldr_set_cwd ( ipc_callid_t  rid,
ipc_call_t request 
) [static]

Receive a call setting the current working directory.

Parameters:
rid 
request 

Definition at line 136 of file main.c.

static void ldr_set_files ( ipc_callid_t  rid,
ipc_call_t request 
) [static]

Receive a call setting preset files of the program to execute.

Parameters:
rid 
request 

Definition at line 241 of file main.c.

static void ldr_set_pathname ( ipc_callid_t  rid,
ipc_call_t request 
) [static]

Receive a call setting pathname of the program to execute.

Parameters:
rid 
request 

Definition at line 156 of file main.c.

int main ( int  argc,
char *  argv[] 
)

Main entry point.

Parameters:
[in] argc Nmber of arguments in argv vector (ignored).
[in] argv Cmdline argument vector (ignored).
Returns:
Error code.
Driver debug level is set here.

Definition at line 474 of file main.c.


Generated on Thu Jun 2 07:45:58 2011 for HelenOS/USB by  doxygen 1.4.7