criu/include
Kir Kolyshkin 5661d806cb Move error reporting to inside open_proc and friends
...and make it correctly print the file name we were unable to open.
Also, error from fdopen[dir]() is now reported with file name as well.

Note that open_proc() and friends need to be macros in order for
pr_perror() to show actual file name and line number where error occured.

Historical note: the original version of this patch was way more radical,
changing openat() to open() and thus removing pid_dir (replacing with pid
when needed) and open_proc_dir(), changing openat() to open(). The word
from Pavel is he wants to keep the openat/pid_dir optimization because
it saves two dentry lookups in kernel code for each open(). Because of
this optimization (and desire to print correct file name in case
of error) we have to carry both pid and pid_dir everywhere.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-02-17 16:46:25 +04:00
..
atomic.h Gather futex helpers into lock.h 2011-12-26 23:54:18 +04:00
bitops.h restore: Add mutexes via futex syscall and order threads creation 2011-11-18 16:09:01 +04:00
compiler.h compiler: Add compiler noinline attribute and barrier helper 2012-02-14 17:18:09 +04:00
crtools.h IPC: dump semaphores set 2012-02-15 13:33:46 +04:00
files.h restore: Learn to work with shared struct file-s 2012-01-11 16:01:44 +04:00
image.h IPC: dump semaphores set 2012-02-15 13:33:46 +04:00
inet_diag.h Trivial whitespace cleanup 2012-01-30 21:29:42 +04:00
ipc_ns.h IPC: show semaphores set 2012-02-15 13:33:46 +04:00
libnetlink.h net: Define named constant for nlmsg_seq 2011-12-27 20:13:18 +04:00
list.h list: Cleanup spaces/tabs mess 2012-02-01 14:38:49 +04:00
lock.h lock: add a new primitive cr_wait_until_greater (v2) 2012-01-19 16:16:58 +04:00
log.h Move logging functions to log.c 2011-12-19 18:52:50 +04:00
namespaces.h namespaces: parametrized namespace option introduced 2012-01-31 22:32:22 +04:00
parasite-syscall.h Rework parasite code 2012-02-16 22:05:28 +04:00
parasite.h parasite: Some code style tuning in header 2012-02-14 17:18:08 +04:00
proc_parse.h Move error reporting to inside open_proc and friends 2012-02-17 16:46:25 +04:00
processor-flags.h Add processor-flags.h 2012-02-14 17:18:08 +04:00
ptrace.h Rework parasite code 2012-02-16 22:05:28 +04:00
restorer-log.h restorer: move log descriptor from crtools (v2) 2012-01-17 18:08:03 +03:00
restorer.h restore: Add checkpoint/restore for /proc/pid/exe symlink 2012-02-07 20:08:01 +04:00
sockets.h socket.c: use const whenever possible 2012-02-10 18:07:19 +04:00
syscall-codes.h restore: support SYSV IPC vma 2012-02-15 13:30:34 +04:00
syscall.h restore: support SYSV IPC vma 2012-02-15 13:30:34 +04:00
sysctl.h Add sysctl handling engine 2012-02-02 21:22:20 +04:00
types.h include/types.h cleanup: remove *_FILENO 2012-02-14 21:16:00 +04:00
unix_diag.h sockets: Update unix_diag.h 2012-01-10 17:26:50 +04:00
util-net.h util: move recv_fd and send_fd in a separate file 2012-02-01 19:26:41 +04:00
util.h Move error reporting to inside open_proc and friends 2012-02-17 16:46:25 +04:00
uts_ns.h namespaces: split UTS and generic code 2012-01-31 13:43:28 +04:00