From 48c53a66e4ffe18158d6f34f288160570609627e Mon Sep 17 00:00:00 2001 From: hunt Date: Thu, 16 Aug 2007 12:55:19 +0000 Subject: 2007-08-16 Martin Hunt * aux_syscalls.stp (__get_argv): Add parameter to optionally skip the first argv (argv[0]). (__get_compat_argv): Ditto. * syscalls.stp (execve): Set args to the whole argv. For argstr use filename plus argv starting at [1]. (compat_execve): Ditto. * ppc64/syscalls.stp (sys32_exevve): Ditto. From Cai Fei * syscalls.stp (sts_getpgid): Add pid arg. --- tapset/aux_syscalls.stp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tapset/aux_syscalls.stp') diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index ec4cbabf..e2c7a432 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -599,7 +599,7 @@ function __fork_flags:string(flags:long) %} /* This function copies an argv from userspace. */ -function __get_argv:string(a:long) +function __get_argv:string(a:long, first:long) %{ /* pure */ char __user *__user *argv = (char __user *__user *)(long)THIS->a; char __user *vstr; @@ -608,7 +608,8 @@ function __get_argv:string(a:long) char buf[80]; char *ptr = buf; - if (argv) + + if (THIS->first && argv) argv++; while (argv != NULL) { @@ -657,7 +658,7 @@ function __get_argv:string(a:long) *str = 0; %} /* This function copies an argv from userspace. */ -function __get_compat_argv:string(a:long) +function __get_compat_argv:string(a:long, first:long) %{ /* pure */ compat_uptr_t __user *__user *argv = (compat_uptr_t __user *__user *)(long)THIS->a; compat_uptr_t __user *vstr; @@ -666,7 +667,7 @@ function __get_compat_argv:string(a:long) char buf[80]; char *ptr = buf; - if (argv) + if (THIS->first && argv) argv++; while (argv != NULL) { -- cgit