pie: use 'unsigned long' instead u64

Sys_mmap returns 'unsigned long' value. Contrary to x64, ARM has 32bit size of
'unsigned long'. If sys_mmap returns 32bit value, higher 32bit will be filled
0xffffffff.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
pie: always build in arm mode

Parasite blobs should be compiled in arm mode.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Acked-by: Alexander Kartashov <alekskartashov@parallels.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Makefile: Add LDFLAGS directive

This patch adds LDFLAGS directive to build with -static.
You can build in static mode like below:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi LDFLAGS=-static

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Acked-by: Alexander Kartashov <alekskartashov@parallels.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
net: Print link kind when reporting inability to dump such

Kernel has more and more links with rtnl-ops, which report
a string kind of the device, which is handy for debugging.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
crtools: Fix -v option to conform to common sense

The -v option is declared as "optional argument" and thus
only -v=N or -vN are valid. Currently used -v N syntax no
longer works as expected, this will be treated as LOG_ERR
level (single -v) with dangling (unparsed) argument.

Sorry for that :( but it's better to this earlier.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
pie: log: parse %llx argument correctly

A x64 only converts PRIx64 to %lx. However, ARM will convert it to %llx.
Thus, we have to peek one more character and skip it if next is 'l'.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Acked-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
files: ghost -- Make sure we never have ghost bit in id

Just to protect ourself from unpredicted changes.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
vdso: Diet include/vdso.h

In commit 2f5df09da587d3dd4002b25fccc39bf1255b1d0a
we included asm/type.h for bool definition. This
is fine in terms of CRIU but makes cpt2 converter
to carry the whole asm/type.h, sometimes causing
error due to confilicting definitions.

So lets be simplier and include <stdbool.h> instead.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>