[CRIU] [PATCH 02/22] compel: syscalls -- Use stdint types in protos
Cyrill Gorcunov
gorcunov at openvz.org
Wed Oct 19 12:21:17 PDT 2016
We're exporting them outside so no custom sX/uX types
must be here.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
compel/arch/arm/plugins/std/syscalls/syscall.def | 4 ++--
.../ppc64/plugins/std/syscalls/syscall-ppc64.tbl | 4 ++--
compel/arch/x86/plugins/std/syscalls/syscall32.c | 24 +++++++++++-----------
.../arch/x86/plugins/std/syscalls/syscall_32.tbl | 8 ++++----
.../arch/x86/plugins/std/syscalls/syscall_64.tbl | 4 ++--
5 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/compel/arch/arm/plugins/std/syscalls/syscall.def b/compel/arch/arm/plugins/std/syscalls/syscall.def
index e5adbdc48e75..c4e390ac590d 100644
--- a/compel/arch/arm/plugins/std/syscalls/syscall.def
+++ b/compel/arch/arm/plugins/std/syscalls/syscall.def
@@ -77,7 +77,7 @@ setrlimit 164 75 (int resource, struct krlimit *rlim)
mount 40 21 (char *dev_nmae, char *dir_name, char *type, unsigned long flags, void *data)
umount2 39 52 (char *name, int flags)
gettid 178 224 (void)
-futex 98 240 (u32 *uaddr, int op, u32 val, struct timespec *utime, u32 *uaddr2, u32 val3)
+futex 98 240 (uint32_t *uaddr, int op, uint32_t val, struct timespec *utime, uint32_t *uaddr2, uint32_t val3)
set_tid_address 96 256 (int *tid_addr)
restart_syscall 128 0 (void)
timer_create 107 257 (clockid_t which_clock, struct sigevent *timer_event_spec, kernel_timer_t *created_timer_id)
@@ -94,7 +94,7 @@ rt_tgsigqueueinfo 240 363 (pid_t tgid, pid_t pid, int sig, siginfo_t *info)
vmsplice 75 343 (int fd, const struct iovec *iov, unsigned long nr_segs, unsigned int flags)
timerfd_settime 86 353 (int ufd, int flags, const struct itimerspec *utmr, struct itimerspec *otmr)
fanotify_init 262 367 (unsigned int flags, unsigned int event_f_flags)
-fanotify_mark 263 368 (int fanotify_fd, unsigned int flags, u64 mask, int dfd, const char *pathname)
+fanotify_mark 263 368 (int fanotify_fd, unsigned int flags, uint64_t mask, int dfd, const char *pathname)
open_by_handle_at 265 371 (int mountdirfd, struct file_handle *handle, int flags)
setns 268 375 (int fd, int nstype)
kcmp 272 378 (pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2)
diff --git a/compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl b/compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl
index d7033aa39b62..e94277c1df2f 100644
--- a/compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl
+++ b/compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl
@@ -74,7 +74,7 @@ __NR_setrlimit 75 sys_setrlimit (int resource, struct krlimit *rlim)
__NR_mount 21 sys_mount (char *dev_nmae, char *dir_name, char *type, unsigned long flags, void *data)
__NR_umount2 52 sys_umount2 (char *name, int flags)
__NR_gettid 207 sys_gettid (void)
-__NR_futex 221 sys_futex (u32 *uaddr, int op, u32 val, struct timespec *utime, u32 *uaddr2, u32 val3)
+__NR_futex 221 sys_futex (uint32_t *uaddr, int op, uint32_t val, struct timespec *utime, uint32_t *uaddr2, uint32_t val3)
__NR_set_tid_address 232 sys_set_tid_address (int *tid_addr)
__NR_restart_syscall 0 sys_restart_syscall (void)
__NR_sys_timer_create 240 sys_timer_create (clockid_t which_clock, struct sigevent *timer_event_spec, kernel_timer_t *created_timer_id)
@@ -93,7 +93,7 @@ __NR_timerfd_settime 311 sys_timerfd_settime (int ufd, int flags, const struct
__NR_signalfd4 313 sys_signalfd (int fd, k_rtsigset_t *mask, size_t sizemask, int flags)
__NR_rt_tgsigqueueinfo 322 sys_rt_tgsigqueueinfo (pid_t tgid, pid_t pid, int sig, siginfo_t *info)
__NR_fanotify_init 323 sys_fanotify_init (unsigned int flags, unsigned int event_f_flags)
-__NR_fanotify_mark 324 sys_fanotify_mark (int fanotify_fd, unsigned int flags, u64 mask, int dfd, const char *pathname)
+__NR_fanotify_mark 324 sys_fanotify_mark (int fanotify_fd, unsigned int flags, uint64_t mask, int dfd, const char *pathname)
__NR_open_by_handle_at 346 sys_open_by_handle_at (int mountdirfd, struct file_handle *handle, int flags)
__NR_setns 350 sys_setns (int fd, int nstype)
__NR_kcmp 354 sys_kcmp (pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2)
diff --git a/compel/arch/x86/plugins/std/syscalls/syscall32.c b/compel/arch/x86/plugins/std/syscalls/syscall32.c
index 88af59330adf..e172cacfff13 100644
--- a/compel/arch/x86/plugins/std/syscalls/syscall32.c
+++ b/compel/arch/x86/plugins/std/syscalls/syscall32.c
@@ -14,61 +14,61 @@
long sys_socket(int domain, int type, int protocol)
{
- u32 a[] = { (u32)domain, (u32)type, (u32)protocol };
+ uint32_t a[] = { (uint32_t)domain, (uint32_t)type, (uint32_t)protocol };
return sys_socketcall(SYS_SOCKET, (unsigned long *)a);
}
long sys_connect(int sockfd, struct sockaddr *addr, int addrlen)
{
- u32 a[] = {(u32)sockfd, (u32)addr, (u32)addrlen};
+ uint32_t a[] = {(uint32_t)sockfd, (uint32_t)addr, (uint32_t)addrlen};
return sys_socketcall(SYS_CONNECT, (unsigned long *)a);
}
long sys_sendto(int sockfd, void *buff, size_t len, unsigned int flags, struct sockaddr *addr, int addr_len)
{
- u32 a[] = {(u32)sockfd, (u32)buff, (u32)len, (u32)flags, (u32)addr, (u32)addr_len};
+ uint32_t a[] = {(uint32_t)sockfd, (uint32_t)buff, (uint32_t)len, (uint32_t)flags, (uint32_t)addr, (uint32_t)addr_len};
return sys_socketcall(SYS_SENDTO, (unsigned long *)a);
}
long sys_recvfrom(int sockfd, void *ubuf, size_t size, unsigned int flags, struct sockaddr *addr, int *addr_len)
{
- u32 a[] = {(u32)sockfd, (u32)ubuf, (u32)size, (u32)flags, (u32)addr, (u32)addr_len};
+ uint32_t a[] = {(uint32_t)sockfd, (uint32_t)ubuf, (uint32_t)size, (uint32_t)flags, (uint32_t)addr, (uint32_t)addr_len};
return sys_socketcall(SYS_RECVFROM, (unsigned long *)a);
}
long sys_sendmsg(int sockfd, const struct msghdr *msg, int flags)
{
- u32 a[] = {(u32)sockfd, (u32)msg, (u32)flags};
+ uint32_t a[] = {(uint32_t)sockfd, (uint32_t)msg, (uint32_t)flags};
return sys_socketcall(SYS_SENDMSG, (unsigned long *)a);
}
long sys_recvmsg(int sockfd, struct msghdr *msg, int flags)
{
- u32 a[] = {(u32)sockfd, (u32)msg, (u32)flags};
+ uint32_t a[] = {(uint32_t)sockfd, (uint32_t)msg, (uint32_t)flags};
return sys_socketcall(SYS_RECVMSG, (unsigned long *)a);
}
long sys_shutdown(int sockfd, int how)
{
- u32 a[] = {(u32)sockfd, (u32)how};
+ uint32_t a[] = {(uint32_t)sockfd, (uint32_t)how};
return sys_socketcall(SYS_SHUTDOWN, (unsigned long *)a);
}
long sys_bind(int sockfd, const struct sockaddr *addr, int addrlen)
{
- u32 a[] = {(u32)sockfd, (u32)addr, (u32)addrlen};
+ uint32_t a[] = {(uint32_t)sockfd, (uint32_t)addr, (uint32_t)addrlen};
return sys_socketcall(SYS_BIND, (unsigned long *)a);
}
long sys_setsockopt(int sockfd, int level, int optname, const void *optval, unsigned int optlen)
{
- u32 a[] = {(u32)sockfd, (u32)level, (u32)optname, (u32)optval, (u32)optlen};
+ uint32_t a[] = {(uint32_t)sockfd, (uint32_t)level, (uint32_t)optname, (uint32_t)optval, (uint32_t)optlen};
return sys_socketcall(SYS_SETSOCKOPT, (unsigned long *)a);
}
long sys_getsockopt(int sockfd, int level, int optname, const void *optval, unsigned int *optlen)
{
- u32 a[] = {(u32)sockfd, (u32)level, (u32)optname, (u32)optval, (u32)optlen};
+ uint32_t a[] = {(uint32_t)sockfd, (uint32_t)level, (uint32_t)optname, (uint32_t)optval, (uint32_t)optlen};
return sys_socketcall(SYS_GETSOCKOPT, (unsigned long *)a);
}
@@ -79,7 +79,7 @@ long sys_shmat(int shmid, void *shmaddr, int shmflag)
return sys_ipc(SHMAT, shmid, shmflag, 0, shmaddr, 0);
}
-long sys_pread(unsigned int fd, char *ubuf, u32 count, u64 pos)
+long sys_pread(unsigned int fd, char *ubuf, uint32_t count, uint64_t pos)
{
- return sys_pread64(fd, ubuf, count, (u32)(pos & 0xffffffffu), (u32)(pos >> 32));
+ return sys_pread64(fd, ubuf, count, (uint32_t)(pos & 0xffffffffu), (uint32_t)(pos >> 32));
}
diff --git a/compel/arch/x86/plugins/std/syscalls/syscall_32.tbl b/compel/arch/x86/plugins/std/syscalls/syscall_32.tbl
index 7c4867c1b3f5..355de71ad389 100644
--- a/compel/arch/x86/plugins/std/syscalls/syscall_32.tbl
+++ b/compel/arch/x86/plugins/std/syscalls/syscall_32.tbl
@@ -11,7 +11,7 @@ __NR_write 4 sys_write (int fd, const void *buf, unsigned long count)
__NR_open 5 sys_open (const char *filename, int flags, unsigned int mode)
__NR_close 6 sys_close (int fd)
__NR_unlink 10 sys_unlink (char *pathname)
-__NR_lseek 19 sys_lseek (int fd, s32 offset, unsigned int origin)
+__NR_lseek 19 sys_lseek (int fd, int32_t offset, unsigned int origin)
__NR_getpid 20 sys_getpid (void)
__NR_mount 21 sys_mount (const char *dev_name, const char *dir_name, const char *type, unsigned long flags, const void *data)
__NR_ptrace 26 sys_ptrace (long request, pid_t pid, void *addr, void *data)
@@ -45,7 +45,7 @@ __NR_rt_sigreturn 173 sys_rt_sigreturn (void)
__NR_rt_sigaction 174 sys_sigaction (int signum, const rt_sigaction_t *act, rt_sigaction_t *oldact, size_t sigsetsize)
__NR_rt_sigprocmask 175 sys_sigprocmask (int how, k_rtsigset_t *set, k_rtsigset_t *oset, size_t sigsetsize)
__NR_rt_sigqueueinfo 178 sys_rt_sigqueueinfo (pid_t pid, int sig, siginfo_t *uinfo)
-__NR_pread64 180 sys_pread64 (unsigned int fd, char *ubuf, u32 count, u32 poslo, u32 poshi)
+__NR_pread64 180 sys_pread64 (unsigned int fd, char *ubuf, uint32_t count, uint32_t poslo, uint32_t poshi)
__NR_capget 184 sys_capget (struct cap_header *h, struct cap_data *d)
__NR_capset 185 sys_capset (struct cap_header *h, struct cap_data *d)
__NR_sigaltstack 186 sys_sigaltstack (const void *uss_ptr, void *uoss_ptr)
@@ -61,7 +61,7 @@ __NR_setfsgid32 216 sys_setfsgid (int fsgid)
__NR_mincore 218 sys_mincore (void *addr, unsigned long size, unsigned char *vec)
__NR_madvise 219 sys_madvise (unsigned long start, size_t len, int behavior)
__NR_gettid 224 sys_gettid (void)
-__NR_futex 240 sys_futex (u32 *uaddr, int op, u32 val, struct timespec *utime, u32 *uaddr2, u32 val3)
+__NR_futex 240 sys_futex (uint32_t *uaddr, int op, uint32_t val, struct timespec *utime, uint32_t *uaddr2, uint32_t val3)
__NR_set_thread_area 243 sys_set_thread_area (user_desc_t *info)
__NR_get_thread_area 244 sys_get_thread_area (user_desc_t *info)
__NR_io_setup 245 sys_io_setup (unsigned nr_reqs, aio_context_t *ctx32p)
@@ -85,7 +85,7 @@ __NR_signalfd 321 sys_signalfd (int ufd, const k_rtsigset_t *sigmask, size_t
__NR_timerfd_settime 325 sys_timerfd_settime (int ufd, int flags, const struct itimerspec *utmr, struct itimerspec *otmr)
__NR_rt_tgsigqueueinfo 335 sys_rt_tgsigqueueinfo (pid_t tgid, pid_t pid, int sig, siginfo_t *uinfo)
__NR_fanotify_init 338 sys_fanotify_init (unsigned int flags, unsigned int event_f_flags)
-__NR_fanotify_mark 339 sys_fanotify_mark (int fanotify_fd, unsigned int flag, u32 mask, int dfd, const char *pathname)
+__NR_fanotify_mark 339 sys_fanotify_mark (int fanotify_fd, unsigned int flag, uint32_t mask, int dfd, const char *pathname)
__NR_open_by_handle_at 342 sys_open_by_handle_at (int mountdirfd, struct file_handle *handle, int flags)
__NR_setns 346 sys_setns (int fd, int nstype)
__NR_kcmp 349 sys_kcmp (pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2)
diff --git a/compel/arch/x86/plugins/std/syscalls/syscall_64.tbl b/compel/arch/x86/plugins/std/syscalls/syscall_64.tbl
index 285874938b38..dade3a02629c 100644
--- a/compel/arch/x86/plugins/std/syscalls/syscall_64.tbl
+++ b/compel/arch/x86/plugins/std/syscalls/syscall_64.tbl
@@ -71,7 +71,7 @@ __NR_setrlimit 160 sys_setrlimit (int resource, struct krlimit *rlim)
__NR_mount 165 sys_mount (char *dev_nmae, char *dir_name, char *type, unsigned long flags, void *data)
__NR_umount2 166 sys_umount2 (char *name, int flags)
__NR_gettid 186 sys_gettid (void)
-__NR_futex 202 sys_futex (u32 *uaddr, int op, u32 val, struct timespec *utime, u32 *uaddr2, u32 val3)
+__NR_futex 202 sys_futex (uint32_t *uaddr, int op, uint32_t val, struct timespec *utime, uint32_t *uaddr2, uint32_t val3)
__NR_set_thread_area 205 sys_set_thread_area (user_desc_t *info)
__NR_io_setup 206 sys_io_setup (unsigned nr_events, aio_context_t *ctx)
__NR_io_getevents 208 sys_io_getevents (aio_context_t ctx, long min_nr, long nr, struct io_event *evs, struct timespec *tmo)
@@ -97,7 +97,7 @@ __NR_timerfd_settime 286 sys_timerfd_settime (int ufd, int flags, const struct
__NR_signalfd4 289 sys_signalfd (int fd, k_rtsigset_t *mask, size_t sizemask, int flags)
__NR_rt_tgsigqueueinfo 297 sys_rt_tgsigqueueinfo (pid_t tgid, pid_t pid, int sig, siginfo_t *info)
__NR_fanotify_init 300 sys_fanotify_init (unsigned int flags, unsigned int event_f_flags)
-__NR_fanotify_mark 301 sys_fanotify_mark (int fanotify_fd, unsigned int flags, u64 mask, int dfd, const char *pathname)
+__NR_fanotify_mark 301 sys_fanotify_mark (int fanotify_fd, unsigned int flags, uint64_t mask, int dfd, const char *pathname)
__NR_open_by_handle_at 304 sys_open_by_handle_at (int mountdirfd, struct file_handle *handle, int flags)
__NR_setns 308 sys_setns (int fd, int nstype)
__NR_kcmp 312 sys_kcmp (pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2)
--
2.7.4
More information about the CRIU
mailing list