]> granicus.if.org Git - strace/commitdiff
fcntl: create a separate parser for fcntl64 syscall
authorElvira Khabirova <lineprinter0@gmail.com>
Fri, 4 Dec 2015 21:42:58 +0000 (00:42 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 4 Dec 2015 23:12:14 +0000 (23:12 +0000)
* 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.

17 files changed:
fcntl.c
linux/32/syscallent.h
linux/arm/syscallent.h
linux/avr32/syscallent.h
linux/bfin/syscallent.h
linux/hppa/syscallent.h
linux/i386/syscallent.h
linux/m68k/syscallent.h
linux/microblaze/syscallent.h
linux/mips/syscallent-n32.h
linux/mips/syscallent-o32.h
linux/powerpc/syscallent.h
linux/s390/syscallent.h
linux/sh/syscallent.h
linux/sh64/syscallent.h
linux/sparc/syscallent.h
linux/xtensa/syscallent.h

diff --git a/fcntl.c b/fcntl.c
index a864682db1c8678d827aa321a6029ffe584fd498..1ebfa2ef2c8a4dde5c748df22f3cdb523068b945 100644 (file)
--- 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);
+}
index f3e7d194a211014a98495d93dd9ddc36191151c2..5f997e7207058c3f3536449cc44b58f4c0b51eb3 100644 (file)
@@ -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"      },
index ad9b9f4fbeb4a6009a676d97c92b5af3824160b5..70a3a6a27ae3f5d1d516fa6c5df53d9c052fbb8f 100644 (file)
 [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"             },
index 0b587109e008fa4832fcca295ff07cd14619a1d9..a3d06b70c806be5e0c38f1fe86cd5866f9650405 100644 (file)
 [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"              },
index b57dadb01f9d90db9c41c25eb37ebd9ad5fa31e6..071626e74b003641582c579a23ab0cffd273e16a 100644 (file)
 [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"                },
index 3f1dc909195f7fe011ef4baaed8ca89708ea719e..02072019005b3aea9153fc989ac4bc5cdcfb750f 100644 (file)
 [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"               },
index 58a16d011f3cf40d0fd5f3c116228b68802e7326..044ca3241eb95986cb0d3ab44fc5ba4df74e3511 100644 (file)
 [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"                },
index 9a655fd0e5462b3bdf45afb5453a4e284a44891c..5c35e6182de1604d3046114d1596e7132705721c 100644 (file)
 [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"            },
index c2f7d6d03ff21c697b0ed967da39e268b9712a10..0157392824a012979009d2cbf0300b6b621a47bc 100644 (file)
 [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"             },
index 0fc4bb8d855895a6e99242c79588a5603605d4e9..2f90604a1dd11800031e9ae2741a2d62c7754468 100644 (file)
 [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"            },
index 485ede45abb46c36a31e0f61e8a55731af92b38a..9671e49bf96ee37e3265aa9c63628c5df8bfb728 100644 (file)
 [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"             },
index 0bb4c4064e6745578b91d2a69dd348ce0a995147..f59a1a1b7d63f4d1a09c803da4fad437090d1458 100644 (file)
 [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"                },
index c8bf6b1aaf202fa049dcfa1e12a687f526873b44..8ce3537a9728dca3566d7c5c9408ed51d122d1c5 100644 (file)
 [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"              },
index 865e01aa05e9d670980abaeb74ebce2dd6a17bcd..768ae23f4d02df3ecfdf90c04c88d7ae70a954f4 100644 (file)
 [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"             },
index 6b4335f913bf7e3fdad9a0673734f452a8542687..13a236b35271548dab03d0bf2bd9896a4b0e09c8 100644 (file)
 [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"             },
index e4e78410d11c77bc5a2039094d7bbe1dd35fc341..40dadef2b3518378e1e6d3b8d2eaddcc7bd5583a 100644 (file)
 [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"               },
index da6ed45414ea085e859fb73468d33e2810af6621..f448d66cf3dc93b01eee10f78aac0471afbff0fb 100644 (file)
@@ -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"                 },