seize: Warn if crtools tried to seize self

That's not allowed by kernel, but having explicit message is nice.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
pages: Accept pages images from versions v0.4 and below

After reworkring the way pagemap is stored the backward compatibility
was not preserved for patches simplicity. Time to return it back.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
sk-unix: Don't zap error returned

If error happened during queue read don't zap it.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
dump: Be more specific about inability to dump 32bit tasks on x86

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
x86: Use pr_perror instead of plain perror

And add pid arg for more verbosity.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
pie: Bump .got table into .crblob section

It's being noticed on arm platform the .got table
has been missed to include in .crblob section,
so fix it.

Reported-by: Chanho Park <chanho61.park@samsusng.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restore: Unify exit() return code

Some exit()'s are called with exit(-1), some
are with exit(1). Use exit(1) everywhere for
consistency.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
sk-packet: fix error handling

lookup_socket() returns pointer or NULL.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: execute sigpending and sk-netlink only on linux-cr

The functionality for dumping signals and netlink sockets are not merged
in the upstream kernel yet.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
msg: Make final dump/restore more descriptive

Currently dump silently terminates and restore emits some
meaning-less messages in either case. Make these important
messages more informative.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
inventory: Kill inventory.img file in case of failed dump

This will result in more sane error in case restore is launched
on such semi-complete images.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
caps: Print error message on size mismatch

So when we fail print error thus a user would know
where exactly it failed.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
CC: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
rst: Properly check si_code of sigchild

The CLD_XXX macros are not bit fields.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mount: remove root with MS_PRIVATE before pivot_root

Otherwise if the root is mounted with MS_SHARED, pivot_root fails with EINVAL.

Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mount: remove root with MS_PRIVATE before cleaning up mntns

Otherwise we will clean up the root mntns too.

Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
tty: More descriptive log message about --shell-job requirement

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
lock: Show long option in log message about using one

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restorer: Print error code from sys_set_robust_list

Some syscalls return error code, so for easier debugging
instead of zapping it -- print it together with error
message.

And make error message more detailed as well.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
netlink: return errno from do_rtnl_req

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
sockets: skip errors from collecting of netlink and packet sockets

The packet diag are not compiled in Fedora 19 kernel.
The netlink diag is going to be merged in 3.10.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>