X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=geekos%2Finclude%2Fgeekos%2Fargblock.h;fp=geekos%2Finclude%2Fgeekos%2Fargblock.h;h=54fac8b192adf5ac4583dd436d73ad706c5e9ca7;hb=d38e1d6edeee83bfb1e3e3c6e2367faa5055bdfe;hp=0000000000000000000000000000000000000000;hpb=e70e95962c26832628d586e07f9cd1a2e1852d72;p=palacios.git diff --git a/geekos/include/geekos/argblock.h b/geekos/include/geekos/argblock.h new file mode 100644 index 0000000..54fac8b --- /dev/null +++ b/geekos/include/geekos/argblock.h @@ -0,0 +1,34 @@ +/* + * Create and extract the command line argument block for a process + * Copyright (c) 2003 David H. Hovemeyer + * $Revision: 1.1 $ + * + * This is free software. You are permitted to use, + * redistribute, and modify it as specified in the file "COPYING". + */ + +#ifndef GEEKOS_ARGBLOCK_H +#define GEEKOS_ARGBLOCK_H + +/** + * Header struct for accessing argument block from user mode. + * Just cast the address of the argument block passed by + * the kernel to a pointer to this struct. + */ +struct Argument_Block { + int argc; + char **argv; +}; + +#ifdef GEEKOS + +/* + * Functions used by the kernel to create the argument block. + */ +void Get_Argument_Block_Size(const char *command, unsigned *numArgs, ulong_t *argBlockSize); +void Format_Argument_Block(char *argBlock, unsigned numArgs, ulong_t userAddress, + const char *command); + +#endif + +#endif /* GEEKOS_ARGBLOCK_H */