diff options
Diffstat (limited to 'runtime/docs/examples/argv.c')
-rw-r--r-- | runtime/docs/examples/argv.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/docs/examples/argv.c b/runtime/docs/examples/argv.c new file mode 100644 index 00000000..5200c350 --- /dev/null +++ b/runtime/docs/examples/argv.c @@ -0,0 +1,12 @@ +MAP arglist ; + +int inst_do_execve (char * filename, char __user *__user *argv, char __user *__user *envp, struct pt_regs * regs) +{ + struct map_node_str *ptr; + + _stp_copy_argv_from_user (arglist, argv); + + foreach (arglist, ptr) + printk ("%s ", ptr->str); + printk ("\n"); +} |