From daa6c2450fa0646619698f0dc01b0456b2541317 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Fri, 18 May 2012 15:15:57 +0200 Subject: Added process arguments when loaded as modules. --- src/user/test/main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/user/test') diff --git a/src/user/test/main.c b/src/user/test/main.c index c98a619..81753bd 100644 --- a/src/user/test/main.c +++ b/src/user/test/main.c @@ -78,7 +78,17 @@ void fprint(FILE f, char *s) { write(f, 0, strlen(s), s); } -int main() { +int main(char** args) { + char**a; + if (args != 0) { + printk("args"); + for (a = args; *a != 0; a++) { + printk(" - "); + printk(*a); + } + printk("\n"); + } + printk("(test app) malloc(42) = "); printk_hex((uint32_t)malloc(42)); printk("\n"); -- cgit v1.2.3