From: Dmitry V. Levin Date: Wed, 1 May 2013 15:56:22 +0000 (+0000) Subject: Alias sys_*lstat* syscall printing functions X-Git-Tag: v4.8~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=v4.7-174-g44f0ed1;p=strace Alias sys_*lstat* syscall printing functions * file.c (sys_lstat, sys_lstat64, sys_oldlstat): Remove. * linux/dummy.h: Move !HAVE_STRUCT___OLD_KERNEL_STAT aliases forward. (sys_lstat): Alias to sys_stat. (sys_lstat64): Alias to sys_stat64. (sys_oldlstat): Alias to sys_oldstat. * linux/syscall.h (sys_lstat, sys_lstat64, sys_oldlstat): Remove. * linux/x32/syscallent1.h (sys_lstat64): Remove. --- diff --git a/file.c b/file.c index 040f469d..837bfed6 100644 --- a/file.c +++ b/file.c @@ -1360,48 +1360,6 @@ sys_oldfstat(struct tcb *tcp) } #endif -int -sys_lstat(struct tcb *tcp) -{ - if (entering(tcp)) { - printpath(tcp, tcp->u_arg[0]); - tprints(", "); - } else { - printstat(tcp, tcp->u_arg[1]); - } - return 0; -} - -int -sys_lstat64(struct tcb *tcp) -{ -#ifdef HAVE_STAT64 - if (entering(tcp)) { - printpath(tcp, tcp->u_arg[0]); - tprints(", "); - } else { - printstat64(tcp, tcp->u_arg[1]); - } - return 0; -#else - return printargs(tcp); -#endif -} - -#if defined(HAVE_STRUCT___OLD_KERNEL_STAT) -int -sys_oldlstat(struct tcb *tcp) -{ - if (entering(tcp)) { - printpath(tcp, tcp->u_arg[0]); - tprints(", "); - } else { - printoldstat(tcp, tcp->u_arg[1]); - } - return 0; -} -#endif - #if defined(SPARC) || defined(SPARC64) int diff --git a/linux/dummy.h b/linux/dummy.h index fceeb7a4..a54f8a7c 100644 --- a/linux/dummy.h +++ b/linux/dummy.h @@ -26,6 +26,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef HAVE_STRUCT___OLD_KERNEL_STAT +#define sys_oldfstat printargs +#define sys_oldstat printargs +#endif + /* still unfinished */ #define sys_add_key printargs #define sys_fanotify_init printargs @@ -67,9 +72,12 @@ #define sys_geteuid sys_getuid #define sys_getgid sys_getuid #define sys_getresgid sys_getresuid +#define sys_lstat sys_stat +#define sys_lstat64 sys_stat64 #define sys_mlock sys_munmap #define sys_mq_unlink sys_chdir #define sys_munlock sys_munmap +#define sys_oldlstat sys_oldstat #define sys_pivotroot sys_link #define sys_rename sys_link #define sys_rmdir sys_chdir @@ -156,9 +164,3 @@ #if (!defined(SPARC) && !defined(SPARC64)) || !defined(SYS_putpmsg) #define sys_putpmsg printargs #endif - -#ifndef HAVE_STRUCT___OLD_KERNEL_STAT -#define sys_oldfstat printargs -#define sys_oldlstat printargs -#define sys_oldstat printargs -#endif diff --git a/linux/syscall.h b/linux/syscall.h index 090b54c3..6368cefe 100644 --- a/linux/syscall.h +++ b/linux/syscall.h @@ -126,8 +126,6 @@ int sys_listen(); int sys_listxattr(); int sys_llseek(); int sys_lseek(); -int sys_lstat(); -int sys_lstat64(); int sys_madvise(); int sys_mbind(); int sys_migrate_pages(); @@ -161,7 +159,6 @@ int sys_newfstatat(); int sys_old_mmap(); int sys_old_mmap_pgoff(); int sys_oldfstat(); -int sys_oldlstat(); int sys_oldselect(); int sys_oldstat(); int sys_open(); diff --git a/linux/x32/syscallent1.h b/linux/x32/syscallent1.h index dc1d32ee..091d2c28 100644 --- a/linux/x32/syscallent1.h +++ b/linux/x32/syscallent1.h @@ -1,6 +1,5 @@ /* Our second set comes from the i386 files. */ -#define sys_lstat64 sys_stat64 #define sys_truncate64 sys_truncate #define sys_ftruncate64 sys_ftruncate #include "../i386/syscallent.h"