From: Elvira Khabirova Date: Fri, 4 Dec 2015 21:42:58 +0000 (+0300) Subject: fcntl: create a separate parser for fcntl64 syscall X-Git-Tag: v4.11~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=211d6ef4b673673fe24060b18ca582b9e68fffbb;p=strace fcntl: create a separate parser for fcntl64 syscall * fcntl.c(print_fcntl): New function, made from SYS_FUNC(fcntl). (SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): Use it. * linux/32/syscallent.h: Change parser of fcntl64 to SEN(fcntl64). * linux/arm/syscallent.h: Likewise. * linux/avr32/syscallent.h: Likewise. * linux/bfin/syscallent.h: Likewise. * linux/hppa/syscallent.h: Likewise. * linux/i386/syscallent.h: Likewise. * linux/m68k/syscallent.h: Likewise. * linux/microblaze/syscallent.h: Likewise. * linux/mips/syscallent-n32.h: Likewise. * linux/mips/syscallent-o32.h: Likewise. * linux/powerpc/syscallent.h: Likewise. * linux/s390/syscallent.h: Likewise. * linux/sh/syscallent.h: Likewise. * linux/sh64/syscallent.h: Likewise. * linux/sparc/syscallent.h: Likewise. * linux/xtensa/syscallent.h: Likewise. --- diff --git a/fcntl.c b/fcntl.c index a864682d..1ebfa2ef 100644 --- a/fcntl.c +++ b/fcntl.c @@ -83,7 +83,8 @@ print_f_owner_ex(struct tcb *tcp, const long addr) tprintf(", pid=%d}", owner.pid); } -SYS_FUNC(fcntl) +static int +print_fcntl(struct tcb *tcp) { if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); @@ -192,3 +193,13 @@ SYS_FUNC(fcntl) } return 0; } + +SYS_FUNC(fcntl) +{ + return print_fcntl(tcp); +} + +SYS_FUNC(fcntl64) +{ + return print_fcntl(tcp); +} diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h index f3e7d194..5f997e72 100644 --- a/linux/32/syscallent.h +++ b/linux/32/syscallent.h @@ -26,7 +26,7 @@ [ 22] = { 6, TD, SEN(epoll_pwait), "epoll_pwait" }, [ 23] = { 1, TD, SEN(dup), "dup" }, [ 24] = { 3, TD, SEN(dup3), "dup3" }, -[ 25] = { 3, TD, SEN(fcntl), "fcntl64" }, +[ 25] = { 3, TD, SEN(fcntl64), "fcntl64" }, [ 26] = { 1, TD, SEN(inotify_init1), "inotify_init1" }, [ 27] = { 3, TD, SEN(inotify_add_watch), "inotify_add_watch" }, [ 28] = { 2, TD, SEN(inotify_rm_watch), "inotify_rm_watch" }, diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h index ad9b9f4f..70a3a6a2 100644 --- a/linux/arm/syscallent.h +++ b/linux/arm/syscallent.h @@ -247,7 +247,7 @@ [218] = { 2, TF, SEN(pivotroot), "pivot_root" }, [219] = { 3, TM, SEN(mincore), "mincore" }, [220] = { 3, TM, SEN(madvise), "madvise" }, -[221] = { 3, TD, SEN(fcntl), "fcntl64" }, +[221] = { 3, TD, SEN(fcntl64), "fcntl64" }, [222 ... 223] = { }, [224] = { 0, 0, SEN(gettid), "gettid" }, [225] = { 5, TD, SEN(readahead), "readahead" }, diff --git a/linux/avr32/syscallent.h b/linux/avr32/syscallent.h index 0b587109..a3d06b70 100644 --- a/linux/avr32/syscallent.h +++ b/linux/avr32/syscallent.h @@ -200,7 +200,7 @@ [172] = { 3, TM, SEN(mincore), "mincore" }, [173] = { 3, TM, SEN(madvise), "madvise" }, [174] = { 3, TD, SEN(getdents64), "getdents64" }, -[175] = { 3, TD, SEN(fcntl), "fcntl64" }, +[175] = { 3, TD, SEN(fcntl64), "fcntl64" }, [176] = { 0, 0, SEN(gettid), "gettid" }, [177] = { 4, TD, SEN(readahead), "readahead" }, [178] = { 5, TF, SEN(setxattr), "setxattr" }, diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h index b57dadb0..071626e7 100644 --- a/linux/bfin/syscallent.h +++ b/linux/bfin/syscallent.h @@ -247,7 +247,7 @@ [218] = { 3, TM, SEN(mincore), "mincore" }, [219] = { 3, TM, SEN(madvise), "madvise" }, [220] = { 3, TD, SEN(getdents64), "getdents64" }, -[221] = { 3, TD, SEN(fcntl), "fcntl64" }, +[221] = { 3, TD, SEN(fcntl64), "fcntl64" }, [222] = { }, [223] = { 5, 0, SEN(security), "security" }, [224] = { 0, 0, SEN(gettid), "gettid" }, diff --git a/linux/hppa/syscallent.h b/linux/hppa/syscallent.h index 3f1dc909..02072019 100644 --- a/linux/hppa/syscallent.h +++ b/linux/hppa/syscallent.h @@ -204,7 +204,7 @@ [199] = { 3, TF, SEN(truncate64), "truncate64" }, [200] = { 3, TD, SEN(ftruncate64), "ftruncate64" }, [201] = { 3, TD, SEN(getdents64), "getdents64" }, -[202] = { 3, TD, SEN(fcntl), "fcntl64" }, +[202] = { 3, TD, SEN(fcntl64), "fcntl64" }, [203] = { 5, 0, SEN(printargs), "attrctl" }, [204] = { 5, 0, SEN(printargs), "acl_get" }, [205] = { 5, 0, SEN(printargs), "acl_set" }, diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h index 58a16d01..044ca324 100644 --- a/linux/i386/syscallent.h +++ b/linux/i386/syscallent.h @@ -247,7 +247,7 @@ [218] = { 3, TM, SEN(mincore), "mincore" }, [219] = { 3, TM, SEN(madvise), "madvise" }, [220] = { 3, TD, SEN(getdents64), "getdents64" }, -[221] = { 3, TD, SEN(fcntl), "fcntl64" }, +[221] = { 3, TD, SEN(fcntl64), "fcntl64" }, [222] = { }, [223] = { 5, 0, SEN(security), "security" }, [224] = { 0, 0, SEN(gettid), "gettid" }, diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h index 9a655fd0..5c35e618 100644 --- a/linux/m68k/syscallent.h +++ b/linux/m68k/syscallent.h @@ -264,7 +264,7 @@ [236] = { 4, TD|TN, SEN(sendfile64), "sendfile64" }, [237] = { 3, TM, SEN(mincore), "mincore" }, [238] = { 3, TM, SEN(madvise), "madvise" }, -[239] = { 3, TD, SEN(fcntl), "fcntl64" }, +[239] = { 3, TD, SEN(fcntl64), "fcntl64" }, [240] = { 4, TD, SEN(readahead), "readahead" }, [241] = { 2, 0, SEN(io_setup), "io_setup" }, [242] = { 1, 0, SEN(io_destroy), "io_destroy" }, diff --git a/linux/microblaze/syscallent.h b/linux/microblaze/syscallent.h index c2f7d6d0..01573928 100644 --- a/linux/microblaze/syscallent.h +++ b/linux/microblaze/syscallent.h @@ -247,7 +247,7 @@ [218] = { 3, TM, SEN(mincore), "mincore" }, [219] = { 3, TM, SEN(madvise), "madvise" }, [220] = { 3, TD, SEN(getdents64), "getdents64" }, -[221] = { 3, TD, SEN(fcntl), "fcntl64" }, +[221] = { 3, TD, SEN(fcntl64), "fcntl64" }, [222 ... 223] = { }, [224] = { 0, 0, SEN(gettid), "gettid" }, [225] = { 4, TD, SEN(readahead), "readahead" }, diff --git a/linux/mips/syscallent-n32.h b/linux/mips/syscallent-n32.h index 0fc4bb8d..2f90604a 100644 --- a/linux/mips/syscallent-n32.h +++ b/linux/mips/syscallent-n32.h @@ -212,7 +212,7 @@ [6209] = { 4, TD, SEN(epoll_wait), "epoll_wait" }, [6210] = { 5, TM|SI, SEN(remap_file_pages), "remap_file_pages" }, [6211] = { 0, TS, SEN(rt_sigreturn), "rt_sigreturn" }, -[6212] = { 3, TD, SEN(fcntl), "fcntl64" }, +[6212] = { 3, TD, SEN(fcntl64), "fcntl64" }, [6213] = { 1, 0, SEN(set_tid_address), "set_tid_address" }, [6214] = { 0, 0, SEN(restart_syscall), "restart_syscall" }, [6215] = { 4, TI, SEN(semtimedop), "semtimedop" }, diff --git a/linux/mips/syscallent-o32.h b/linux/mips/syscallent-o32.h index 485ede45..9671e49b 100644 --- a/linux/mips/syscallent-o32.h +++ b/linux/mips/syscallent-o32.h @@ -220,7 +220,7 @@ [4217] = { 3, TM, SEN(mincore), "mincore" }, [4218] = { 3, TM, SEN(madvise), "madvise" }, [4219] = { 3, TD, SEN(getdents64), "getdents64" }, -[4220] = { 3, TD, SEN(fcntl), "fcntl64" }, +[4220] = { 3, TD, SEN(fcntl64), "fcntl64" }, [4221] = { }, [4222] = { 0, 0, SEN(gettid), "gettid" }, [4223] = { 5, TD, SEN(readahead), "readahead" }, diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h index 0bb4c406..f59a1a1b 100644 --- a/linux/powerpc/syscallent.h +++ b/linux/powerpc/syscallent.h @@ -230,7 +230,7 @@ [201] = { 6, 0, SEN(printargs), "MOL" }, [202] = { 3, TD, SEN(getdents64), "getdents64" }, [203] = { 2, TF, SEN(pivotroot), "pivot_root" }, -[204] = { 3, TD, SEN(fcntl), "fcntl64" }, +[204] = { 3, TD, SEN(fcntl64), "fcntl64" }, [205] = { 3, TM, SEN(madvise), "madvise" }, [206] = { 3, TM, SEN(mincore), "mincore" }, [207] = { 0, 0, SEN(gettid), "gettid" }, diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h index c8bf6b1a..8ce3537a 100644 --- a/linux/s390/syscallent.h +++ b/linux/s390/syscallent.h @@ -249,7 +249,7 @@ [218] = { 3, TM, SEN(mincore), "mincore" }, [219] = { 3, TM, SEN(madvise), "madvise" }, [220] = { 3, TD, SEN(getdents64), "getdents64" }, -[221] = { 3, TD, SEN(fcntl), "fcntl64" }, +[221] = { 3, TD, SEN(fcntl64), "fcntl64" }, [222] = { 4, TD, SEN(readahead), "readahead" }, [223] = { 4, TD|TN, SEN(sendfile64), "sendfile64" }, [224] = { 5, TF, SEN(setxattr), "setxattr" }, diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h index 865e01aa..768ae23f 100644 --- a/linux/sh/syscallent.h +++ b/linux/sh/syscallent.h @@ -248,7 +248,7 @@ [218] = { 3, TM, SEN(mincore), "mincore" }, [219] = { 3, TM, SEN(madvise), "madvise" }, [220] = { 3, TD, SEN(getdents64), "getdents64" }, -[221] = { 3, TD, SEN(fcntl), "fcntl64" }, +[221] = { 3, TD, SEN(fcntl64), "fcntl64" }, [222 ... 223] = { }, [224] = { 4, 0, SEN(gettid), "gettid" }, [225] = { 4, TD, SEN(readahead), "readahead" }, diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h index 6b4335f9..13a236b3 100644 --- a/linux/sh64/syscallent.h +++ b/linux/sh64/syscallent.h @@ -274,7 +274,7 @@ [246] = { 3, TI, SEN(shmget), "shmget" }, [247] = { 4, TI, SEN(shmctl), "shmctl" }, [248] = { 3, TD, SEN(getdents64), "getdents64" }, -[249] = { 3, TD, SEN(fcntl), "fcntl64" }, +[249] = { 3, TD, SEN(fcntl64), "fcntl64" }, [250 ... 251] = { }, [252] = { 4, 0, SEN(gettid), "gettid" }, [253] = { 3, TD, SEN(readahead), "readahead" }, diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h index e4e78410..40dadef2 100644 --- a/linux/sparc/syscallent.h +++ b/linux/sparc/syscallent.h @@ -153,7 +153,7 @@ [152] = { 3, TD, SEN(inotify_add_watch), "inotify_add_watch" }, [153] = { 3, TD, SEN(poll), "poll" }, [154] = { 3, TD, SEN(getdents64), "getdents64" }, -[155] = { 3, TD, SEN(fcntl), "fcntl64" }, +[155] = { 3, TD, SEN(fcntl64), "fcntl64" }, [156] = { 2, TD, SEN(inotify_rm_watch), "inotify_rm_watch" }, [157] = { 2, TF, SEN(statfs), "statfs" }, [158] = { 2, TD, SEN(fstatfs), "fstatfs" }, diff --git a/linux/xtensa/syscallent.h b/linux/xtensa/syscallent.h index da6ed454..f448d66c 100644 --- a/linux/xtensa/syscallent.h +++ b/linux/xtensa/syscallent.h @@ -54,7 +54,7 @@ [ 58] = { 1, 0, SEN(umask), "umask" }, [ 59] = { 3, TD, SEN(getdents), "getdents" }, [ 60] = { 3, TD, SEN(getdents64), "getdents64" }, -[ 61] = { 3, TD, SEN(fcntl), "fcntl64" }, +[ 61] = { 3, TD, SEN(fcntl64), "fcntl64" }, [ 62] = { 6, TD, SEN(fallocate), "fallocate" }, [ 63] = { 6, TD, SEN(fadvise64_64), "fadvise64_64" }, [ 64] = { 2, TF, SEN(utime), "utime" },