]> granicus.if.org Git - strace/commitdiff
Implement and use new parsers of nanosleep syscall
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)
* time.c (SYS_FUNC(nanosleep)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS || HAVE_ARCH_OLD_TIME64_SYSCALLS]
(do_nanosleep): New function.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(nanosleep_time32)): Likewise.
[HAVE_ARCH_OLD_TIME64_SYSCALLS] (SYS_FUNC(nanosleep_time64)): Likewise.
* linux/64/syscallent.h: Replace SEN(nanosleep) with
SEN(nanosleep_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(nanosleep) with
SEN(nanosleep_time32).
* 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/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.

26 files changed:
linux/32/syscallent.h
linux/64/syscallent.h
linux/alpha/syscallent.h
linux/arm/syscallent.h
linux/avr32/syscallent.h
linux/bfin/syscallent.h
linux/hppa/syscallent.h
linux/i386/syscallent.h
linux/ia64/syscallent.h
linux/m68k/syscallent.h
linux/microblaze/syscallent.h
linux/mips/syscallent-n32.h
linux/mips/syscallent-n64.h
linux/mips/syscallent-o32.h
linux/powerpc/syscallent.h
linux/powerpc64/syscallent.h
linux/s390/syscallent.h
linux/s390x/syscallent.h
linux/sh/syscallent.h
linux/sh64/syscallent.h
linux/sparc/syscallent.h
linux/sparc64/syscallent.h
linux/x32/syscallent.h
linux/x86_64/syscallent.h
linux/xtensa/syscallent.h
time.c

index 7f0e9c9be7931927f018e39e7759d52878eedc78..4d2a17fc118de588f0d319ba1cc09c8d983c91cf 100644 (file)
 [ 98] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [ 99] = { 2,   0,              SEN(set_robust_list),           "set_robust_list"       },
 [100] = { 3,   0,              SEN(get_robust_list),           "get_robust_list"       },
-[101] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[101] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [102] = { 2,   0,              SEN(getitimer),                 "getitimer"             },
 [103] = { 3,   0,              SEN(setitimer),                 "setitimer"             },
 [104] = { 4,   0,              SEN(kexec_load),                "kexec_load"            },
index bc8b29fce9fef65853f88adaa06f3c3785cbe5f7..057d9b3aeae64073d2196774c56aefae709a61c8 100644 (file)
 [ 98] = { 6,   0,              SEN(futex_time64),              "futex"                 },
 [ 99] = { 2,   0,              SEN(set_robust_list),           "set_robust_list"       },
 [100] = { 3,   0,              SEN(get_robust_list),           "get_robust_list"       },
-[101] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[101] = { 2,   0,              SEN(nanosleep_time64),          "nanosleep"             },
 [102] = { 2,   0,              SEN(getitimer),                 "getitimer"             },
 [103] = { 3,   0,              SEN(setitimer),                 "setitimer"             },
 [104] = { 4,   0,              SEN(kexec_load),                "kexec_load"            },
index 6af9240cdd0759934966fd382a2563ea203eaffa..42e6e3a45b3081781420d602a932c22f4b82798c 100644 (file)
 [337] = { 2,   0,              SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
 [338] = { 5,   0,              SEN(afs_syscall),               "afs_syscall"           }, /* not implemented */
 [339] = { 1,   0,              SEN(uname),                     "uname"                 },
-[340] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[340] = { 2,   0,              SEN(nanosleep_time64),          "nanosleep"             },
 [341] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [342] = { 3,   0,              SEN(nfsservctl),                "nfsservctl"            }, /* not implemented */
 [343] = { 3,   0,              SEN(setresuid),                 "setresuid"             },
index 50b19c612502501698b3c4b59d8aaa8e3aa8c26f..7949c4e970f1f90aa77299bdee30f49a823fab5a 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164] = { 3,   0,              SEN(setresuid16),               "setresuid"             },
 [165] = { 3,   0,              SEN(getresuid16),               "getresuid"             },
index 1c38aa8966fa346d50a2dab17b9a5d11768f365c..e7aa0cacce5a78f74915cbbb8f027acc578a72cc 100644 (file)
 [140] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [141] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [142] = { 2,   0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[143] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[143] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [144] = { 3,   TD,             SEN(poll_time32),               "poll"                  },
 [145] = { 3,   0,              SEN(nfsservctl),                "nfsservctl"            },
 [146] = { 3,   0,              SEN(setresgid),                 "setresgid"             },
index feea293df989fffabdd1f15dacd9ac1539bdad62..4d6cf64c1373111438147c5342338d50fc2850e6 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164] = { 3,   0,              SEN(setresuid16),               "setresuid"             },
 [165] = { 3,   0,              SEN(getresuid16),               "getresuid"             },
index 78efa407829fe090723a70faee1d540e969c14df..d073284af3084f81520f457bee90d692205d9b47 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164] = { 3,   0,              SEN(setresuid),                 "setresuid"             },
 [165] = { 3,   0,              SEN(getresuid),                 "getresuid"             },
index ccea1c1a96bf3a7c2e192779836efeea5603e897..3f2d2d9c62351ee65bf72a7fe553465a8232545f 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164] = { 3,   0,              SEN(setresuid16),               "setresuid"             },
 [165] = { 3,   0,              SEN(getresuid16),               "getresuid"             },
index 5bae4981c1f25b837e9dbeeccb6e2c65d26f6d1b..893e0b5c3e8679f45731e3ea377bd2347ae10697 100644 (file)
 [1024 + 141] = { 1,    0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [1024 + 142] = { 1,    0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [1024 + 143] = { 2,    0,              SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
-[1024 + 144] = { 2,    0,              SEN(nanosleep),                 "nanosleep"             },
+[1024 + 144] = { 2,    0,              SEN(nanosleep_time64),          "nanosleep"             },
 [1024 + 145] = { 3,    0,              SEN(nfsservctl),                "nfsservctl"            },
 [1024 + 146] = { 5,    0,              SEN(prctl),                     "prctl"                 },
 [1024 + 147] = { 0,    PU|NF,          SEN(getpagesize),               "getpagesize"           },
index 41339f246de9d774f572a6413e9831752d8f17c5..e866f104b710231713deeccc0c1ebcb0a6b00ce1 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164] = { 3,   0,              SEN(setresuid16),               "setresuid"             },
 [165] = { 3,   0,              SEN(getresuid16),               "getresuid"             },
index b2f6d5338c6f92b3b75ecf79f199b9855e912139..f43e4d18185726f12dc5bc1ffa45de85a0b2f3e6 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164] = { 3,   0,              SEN(setresuid16),               "setresuid"             },
 [165] = { 3,   0,              SEN(getresuid16),               "getresuid"             },
index 2516b655e8f6fe1ff9271f8d9bd017037b6e582d..627eeed04e410bd6ee0386fcad31cc3c358d9411 100644 (file)
@@ -41,7 +41,7 @@
 [6031] = { 1,  TD,             SEN(dup),                       "dup"                   },
 [6032] = { 2,  TD,             SEN(dup2),                      "dup2"                  },
 [6033] = { 0,  TS,             SEN(pause),                     "pause"                 },
-[6034] = { 2,  0,              SEN(nanosleep),                 "nanosleep"             },
+[6034] = { 2,  0,              SEN(nanosleep_time32),          "nanosleep"             },
 [6035] = { 2,  0,              SEN(getitimer),                 "getitimer"             },
 [6036] = { 3,  0,              SEN(setitimer),                 "setitimer"             },
 [6037] = { 1,  0,              SEN(alarm),                     "alarm"                 },
index 6bdfbf8971cb012723fb750e5145109bd7f7b1c9..93ae373c5a15f3b81c5c1e1add48569c4bc599be 100644 (file)
@@ -41,7 +41,7 @@
 [5031] = { 1,  TD,             SEN(dup),                       "dup"                   },
 [5032] = { 2,  TD,             SEN(dup2),                      "dup2"                  },
 [5033] = { 0,  TS,             SEN(pause),                     "pause"                 },
-[5034] = { 2,  0,              SEN(nanosleep),                 "nanosleep"             },
+[5034] = { 2,  0,              SEN(nanosleep_time64),          "nanosleep"             },
 [5035] = { 2,  0,              SEN(getitimer),                 "getitimer"             },
 [5036] = { 3,  0,              SEN(setitimer),                 "setitimer"             },
 [5037] = { 1,  0,              SEN(alarm),                     "alarm"                 },
index a29649aee1bc1fe52db411bc66f93ba49290b4bb..55c0d9548eb4953a3908c49d413e91419f5e17d0 100644 (file)
 [4163] = { 1,  0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [4164] = { 1,  0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [4165] = { 2,  0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[4166] = { 2,  0,              SEN(nanosleep),                 "nanosleep"             },
+[4166] = { 2,  0,              SEN(nanosleep_time32),          "nanosleep"             },
 [4167] = { 5,  TM|SI,          SEN(mremap),                    "mremap"                },
 [4168] = { 3,  TN,             SEN(accept),                    "accept"                },
 [4169] = { 3,  TN,             SEN(bind),                      "bind"                  },
index 627117c6247f9c9906c5b5bd093871eac36445ec..10a07c5cfded73bc49f604316b2bc4f789016cb9 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164] = { 3,   0,              SEN(setresuid),                 "setresuid"             },
 [165] = { 3,   0,              SEN(getresuid),                 "getresuid"             },
index 12e2368aa46608f612c101b142f4bef66cbd2758..0ddb5b9fcd592c986274306c73087d2c08ebdf1c 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time64),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164] = { 3,   0,              SEN(setresuid),                 "setresuid"             },
 [165] = { 3,   0,              SEN(getresuid),                 "getresuid"             },
index 2168bcdcadbddf3784861833a184c9e667276383..bff4a6d332ce2d5bcd5d0b99689599a52a8ff112 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164] = { 3,   0,              SEN(setresuid16),               "setresuid"             },
 [165] = { 3,   0,              SEN(getresuid16),               "getresuid"             },
index 37f4e23d165af4f11428e358d3cd9e4a05aa7e79..0d3ab2bc311b8e84e9080d8a24734db14ddab72f 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time64),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164 ... 166] = { },
 [167] = { 5,   0,              SEN(query_module),              "query_module"          },
index b039fb7a62e3afcabcf0eb9a3b6e464d171f5a69..ac718a0ba9495b7178740c6beeab1b3e5f3dac92 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164] = { 3,   0,              SEN(setresuid16),               "setresuid"             },
 [165] = { 3,   0,              SEN(getresuid16),               "getresuid"             },
index ab9e61e9321fded9c60e7557f2a3d96b242a949c..517f1ce028d18da113100f5af9d11c4ce1c10ba6 100644 (file)
 [159] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [160] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [161] = { 2,   0,              SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
-[162] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[162] = { 2,   0,              SEN(nanosleep_time64),          "nanosleep"             },
 [163] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [164] = { 3,   0,              SEN(setresuid16),               "setresuid"             },
 [165] = { 3,   0,              SEN(getresuid16),               "getresuid"             },
index 7baf6ff8e527e3ebea5afcfcb07463e892131545..3d9ac03d2132264551f05079d57cb11770e9bd47 100644 (file)
 [246] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [247] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [248] = { 2,   0,              SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[249] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[249] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [250] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [251] = { 1,   0,              SEN(sysctl),                    "_sysctl"               },
 [252] = { 1,   0,              SEN(getsid),                    "getsid"                },
index 917b0ceb6b0543840e109df66420894606d9f95c..e7c6686adc32620e304122ebe810f1e5a67ae122 100644 (file)
 [246] = { 1,   0,              SEN(sched_get_priority_max),    "sched_get_priority_max"},
 [247] = { 1,   0,              SEN(sched_get_priority_min),    "sched_get_priority_min"},
 [248] = { 2,   0,              SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
-[249] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[249] = { 2,   0,              SEN(nanosleep_time64),          "nanosleep"             },
 [250] = { 5,   TM|SI,          SEN(mremap),                    "mremap"                },
 [251] = { 1,   0,              SEN(sysctl),                    "_sysctl"               },
 [252] = { 1,   0,              SEN(getsid),                    "getsid"                },
index 63f1067112c4f33a424cef0615fb262179f5f0e3..07b3274aafa55d70a94a30b27d91adc27cfba668 100644 (file)
@@ -40,7 +40,7 @@
 [ 32] = { 1,   TD,             SEN(dup),                       "dup"                   },
 [ 33] = { 2,   TD,             SEN(dup2),                      "dup2"                  },
 [ 34] = { 0,   TS,             SEN(pause),                     "pause"                 },
-[ 35] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[ 35] = { 2,   0,              SEN(nanosleep_time64),          "nanosleep"             },
 [ 36] = { 2,   0,              SEN(getitimer),                 "getitimer"             },
 [ 37] = { 1,   0,              SEN(alarm),                     "alarm"                 },
 [ 38] = { 3,   0,              SEN(setitimer),                 "setitimer"             },
index 3d33bb579f562f25a533e7b207496cba7d7e7bfc..1be7d3ac1b52b12610f3c2531b924359272838c4 100644 (file)
@@ -40,7 +40,7 @@
 [ 32] = { 1,   TD,             SEN(dup),                       "dup"                   },
 [ 33] = { 2,   TD,             SEN(dup2),                      "dup2"                  },
 [ 34] = { 0,   TS,             SEN(pause),                     "pause"                 },
-[ 35] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[ 35] = { 2,   0,              SEN(nanosleep_time64),          "nanosleep"             },
 [ 36] = { 2,   0,              SEN(getitimer),                 "getitimer"             },
 [ 37] = { 1,   0,              SEN(alarm),                     "alarm"                 },
 [ 38] = { 3,   0,              SEN(setitimer),                 "setitimer"             },
index 8af8193415e7c48b93d0adb5eba67947effc61fc..b82ff048e73284d8e22e2738cb410ddb4b4b407c 100644 (file)
 [192] = { 2,   0,              SEN(gettimeofday),              "gettimeofday"          },
 [193] = { 2,   0,              SEN(settimeofday),              "settimeofday"          },
 [194] = { 1,   0,              SEN(adjtimex32),                "adjtimex"              },
-[195] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
+[195] = { 2,   0,              SEN(nanosleep_time32),          "nanosleep"             },
 [196] = { 2,   0,              SEN(getgroups),                 "getgroups"             },
 [197] = { 2,   0,              SEN(setgroups),                 "setgroups"             },
 [198] = { 2,   0,              SEN(sethostname),               "sethostname"           },
diff --git a/time.c b/time.c
index fba56e365b57b03f45b84469537a97aac14e32d6..634bcaf05f729d0a542fa4bb38ddfce282d4d549 100644 (file)
--- a/time.c
+++ b/time.c
@@ -67,10 +67,12 @@ SYS_FUNC(osf_settimeofday)
 }
 #endif
 
-SYS_FUNC(nanosleep)
+#if HAVE_ARCH_TIME32_SYSCALLS || HAVE_ARCH_OLD_TIME64_SYSCALLS
+static int
+do_nanosleep(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
 {
        if (entering(tcp)) {
-               print_timespec(tcp, tcp->u_arg[0]);
+               print_ts(tcp, tcp->u_arg[0]);
                tprints(", ");
        } else {
 
@@ -82,7 +84,7 @@ SYS_FUNC(nanosleep)
                 */
                if (is_erestart(tcp)) {
                        temporarily_clear_syserror(tcp);
-                       print_timespec(tcp, tcp->u_arg[1]);
+                       print_ts(tcp, tcp->u_arg[1]);
                        restore_cleared_syserror(tcp);
                } else {
                        printaddr(tcp->u_arg[1]);
@@ -90,6 +92,21 @@ SYS_FUNC(nanosleep)
        }
        return 0;
 }
+#endif /* HAVE_ARCH_TIME32_SYSCALLS || HAVE_ARCH_OLD_TIME64_SYSCALLS */
+
+#if HAVE_ARCH_TIME32_SYSCALLS
+SYS_FUNC(nanosleep_time32)
+{
+       return do_nanosleep(tcp, print_timespec32);
+}
+#endif
+
+#if HAVE_ARCH_OLD_TIME64_SYSCALLS
+SYS_FUNC(nanosleep_time64)
+{
+       return do_nanosleep(tcp, print_timespec64);
+}
+#endif
 
 #include "xlat/itimer_which.h"