criu/include
Laurent Dufour 8ceab588a5 crtools: no more linked with builtin syscall
crtools binary is linked with the C library and could rely on all the
services this library is providing, including system calls.

Thus it doesn't need to be linked with the builtin system calls code
made for the parasite/restorer binaries.

This patch does:
 - remove the inclusion of syscall.h
 - replace all call to sys_<syscall>() by C library <syscall>()
 - replace unwrapped system calls by syscall(SYS_<syscall>,...)
 - fix the generated compiler's issues.

There should not be any functional changes. The only 'code' changes is
appearing in locks.h when futex is called through the C library, the
errno value is fetched from errno variable instead of the return
value.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-06 20:42:03 +03:00
..
asm-generic vdso: Rework vdso processing files 2015-09-10 14:07:22 +03:00
action-scripts.h criu [PATCH] post-setup-namespaces 2016-01-20 11:08:22 +03:00
aio.h aio: Restore AIO contexts 2014-12-26 18:13:40 +03:00
bfd.h bfd: add breadchr 2015-10-27 22:51:09 +03:00
bitmap.h bitmap -- Add few helpers for bits manipulations 2015-11-12 11:15:02 +03:00
bug.h bug: Include <stdbool.h> 2014-02-21 16:27:16 +04:00
cgroup.h cgroup: restore perms on cgroup dirs as well 2016-01-27 16:45:24 +03:00
compiler.h define macro for stack alignment 2016-01-13 15:50:42 +03:00
config-base.h config-base: Add F_SETPIPE_SZ/F_GETPIPE_SZ 2014-02-18 12:53:09 +04:00
cpu.h cpuinfo: Add "cpuinfo [dump|check]" commands, v2 2014-10-03 13:26:58 +04:00
cr-errno.h cr_errno: move cr_err helpers into cr_errno.h 2014-12-22 13:50:45 +03:00
cr-service-const.h service: Remove systemd startup mode 2015-12-07 11:28:49 +03:00
cr-service.h scripts: Use numeric action val in RPC notifications 2014-09-05 13:48:27 +04:00
cr-show.h img: Introduce the struct cr_img 2014-09-30 21:48:13 +04:00
cr_options.h service: add support for the --external option 2016-01-20 11:07:31 +03:00
criu-log.h criu-log: introduce print_once 2015-12-29 14:51:28 +03:00
criu-plugin.h plugin: Add PRE_DUMP stage into plugins 2016-02-05 13:24:11 +03:00
crtools.h dump: write an inventory image after dumping all processes 2015-12-29 14:50:38 +03:00
err.h headers: Add err.h header 2013-04-02 20:27:51 +04:00
errno.h headers: Move ERESTART codes to errno.h 2013-11-14 22:22:21 +04:00
eventfd.h anon-inode: Don't readlink fd/fd multiple times 2014-02-02 22:14:29 +04:00
eventpoll.h anon-inode: Don't readlink fd/fd multiple times 2014-02-02 22:14:29 +04:00
fault-injection.h criu: Fault injection core 2015-10-19 12:42:29 +03:00
fcntl.h fsnotify: Open handle with O_PATH, v2 2014-02-25 23:38:35 +04:00
fifo.h img: Rename fdset -> imgset 2014-09-30 21:48:10 +04:00
file-ids.h kcmp: Stop showing ids tree 2015-08-18 18:17:31 +03:00
file-lock.h locks: Don't dump locks in per-task manner (v3) 2014-09-02 17:44:46 +04:00
files-reg.h remap: don't allocate dead pids in wrong context 2015-11-23 11:47:29 +03:00
files.h fds: Remove unused arg from close_old_fds() 2016-01-20 11:10:29 +03:00
fs-magic.h binfmt_misc: Skip dumping if it's not virtual 2015-12-23 15:44:45 +03:00
fsnotify.h fsnotify: Filter out internal inotify bits when restoring marks 2015-10-14 15:51:55 +03:00
image-desc.h fs: Add binfmt_misc support 2015-12-08 14:52:26 +03:00
image.h Add restoring of unnamed unix sockets. 2015-07-29 17:53:36 +03:00
imgset.h img: Introduce the struct cr_img 2014-09-30 21:48:13 +04:00
inet_diag.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
ipc_ns.h ns: Factor out namespace switching call 2014-09-30 21:54:11 +04:00
irmap.h irmap: add --irmap-scan-path option 2015-09-21 11:46:12 +03:00
kcmp-ids.h kcmp: Stop showing ids tree 2015-08-18 18:17:31 +03:00
kcmp.h headers: Move kcmp_type to kcmp.h 2013-11-14 22:13:59 +04:00
kerndat.h kdat: Handle pagemaps with zeroed pfns 2016-01-18 21:07:06 +03:00
libnetlink.h nlk: Add error callback to do_rtnl_req 2015-01-22 18:54:37 +03:00
list.h criu: Several formatting fixes 2014-01-14 09:33:19 +04:00
lock.h crtools: no more linked with builtin syscall 2016-02-06 20:42:03 +03:00
log.h pie: add printf-like functionality to simple_buf 2015-06-16 12:17:35 +03:00
lsm.h lsm: add a --lsm-profile flag 2015-12-08 15:07:26 +03:00
magic.h fs: Add binfmt_misc support 2015-12-08 14:52:26 +03:00
mem.h mem: Move shmem preparation routine and rename 2014-02-03 23:34:12 +04:00
mman.h headers: Move MADV definitions to own mman.h 2013-11-14 22:48:30 +04:00
mount.h mnt: Carry run-time device ID in mount_info 2015-12-08 14:58:32 +03:00
namespaces.h namespace: move definition of CLONE_SUBNS 2016-02-06 20:42:01 +03:00
net.h ns: Prepare namespaces before tasks 2015-09-28 21:56:26 +03:00
netfilter.h headers: Add extern specificator to functions 2013-11-15 17:00:58 +04:00
netlink_diag.h headers: Add missing __CR_ at last endif 2013-11-15 16:59:57 +04:00
packet_diag.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
page-pipe.h page-pipe: split dumping memory on chunks (v3) 2014-02-10 15:06:39 +04:00
page-read.h page-read: Teach page-read to read multiple pages at once 2015-11-12 11:14:43 +03:00
page-xfer.h mem: check existence of parent images before dumping pages (v2) 2014-11-29 19:32:40 +03:00
pagemap-cache.h pagemap-cache: add const-qualifier to pmc's vma 2015-12-08 15:45:44 +03:00
parasite-syscall.h creds: dump -- Implement per-thread dump of credentials 2015-12-24 13:21:50 +03:00
parasite-vdso.h aarch64: Fix write_intraprocedure_branch types 2015-10-05 13:20:01 +03:00
parasite.h vdso: Don't fail if pagemap is not accessbile 2015-12-24 14:40:05 +03:00
pid.h headers: Add missing __CR_ at last endif 2013-11-15 16:59:57 +04:00
pipes.h pipes: move struct pipe_info declaration to pipes.h 2016-01-27 17:32:19 +03:00
plugin.h plugin: Rework plugins API, v2 2014-09-03 20:48:36 +04:00
posix-timer.h posix-timers: Helper for freeing proc parsed data 2014-04-17 12:01:02 +04:00
prctl.h build: conditional define of struct prctl_mm_map 2016-02-06 20:41:59 +03:00
proc_parse.h kerndat: do not report errors on feature test 2015-12-29 14:51:23 +03:00
protobuf-desc.h fs: Add binfmt_misc support 2015-12-08 14:52:26 +03:00
protobuf.h img: Remove O_OPT and COLLECT_OPTIONAL 2015-03-13 14:42:01 +03:00
pstree.h pstree: more pstree-related helpers 2015-12-14 14:04:21 +03:00
ptrace.h seize: don't wory if a cgroup contains some extra tasks (v3) 2015-12-14 15:55:30 +03:00
rbtree.h x86: moved x86-specific files into the directory arch/x86. 2013-01-09 17:02:47 +04:00
restorer.h define macro for stack alignment 2016-01-13 15:50:42 +03:00
rst-malloc.h rst: Lock rst memory allocations earlier 2015-07-14 14:00:27 +03:00
rst_info.h restore: fix race in calculation of a number of zombies 2015-08-03 17:12:10 +03:00
seccomp.h seccomp: is optional when parsing /proc/pid/status 2015-11-23 11:44:50 +03:00
seize.h cgroups: save freezer state during dump 2015-12-16 18:17:01 +03:00
servicefd.h net: Move node's net fd reference into service fd 2015-11-19 16:46:36 +03:00
setproctitle.h crtools: check for setproctitle_init 2014-09-02 16:14:39 +04:00
shmem.h shmem: Turn shmem-info into shared objects from shremap ones 2015-01-12 14:47:24 +03:00
sigframe.h parasite: don't include restorer.h in parasite-syscall.c 2013-11-06 12:39:36 +04:00
signalfd.h img: Rename fdset -> imgset 2014-09-30 21:48:10 +04:00
sk-inet.h crtools: no more linked with builtin syscall 2016-02-06 20:42:03 +03:00
sk-packet.h img: Rename fdset -> imgset 2014-09-30 21:48:10 +04:00
sk-queue.h crtools: move all stuff about vma together 2013-11-06 12:43:49 +04:00
sockets.h crtools: no more linked with builtin syscall 2016-02-06 20:42:03 +03:00
stats.h stats: Fix restore pages stats 2014-02-04 14:03:10 +04:00
string.h make: config -- Add testing if we have libbsd installed 2014-03-26 01:44:23 +04:00
syscall-types.h namespace: move definition of CLONE_SUBNS 2016-02-06 20:42:01 +03:00
sysctl.h sysctl: move sysctl calls to usernsd 2015-10-05 13:16:14 +03:00
sysfs_parse.h Added AUFS support. 2014-08-21 18:35:22 +04:00
timerfd.h rst: Fix timerfd rst memory management 2015-07-14 13:59:39 +03:00
tty.h tty: use a pair of dev and rdev to identify a terminal 2015-12-29 14:47:46 +03:00
tun.h check/zdtm: Introduce fine-grained feature testing 2015-01-22 18:55:34 +03:00
unix_diag.h x86: moved x86-specific files into the directory arch/x86. 2013-01-09 17:02:47 +04:00
util-pie.h headers: Drop uintX_t usage 2013-12-12 10:03:07 +04:00
util-vdso.h pie: Give VDSO symbol table local scope 2015-10-05 13:21:16 +03:00
util.h util: Ability to ignore errno when opening proc 2015-12-24 14:40:02 +03:00
uts_ns.h ns: Factor out namespace switching call 2014-09-30 21:54:11 +04:00
vdso.h vdso: Rework vdso processing files 2015-09-10 14:07:22 +03:00
vma.h Pass task_size to vma_area_is_private() 2015-08-03 17:14:18 +03:00
xmalloc.h xmalloc: Add xmemdup helper 2015-12-24 13:18:05 +03:00