do_create_snapshot: pass guid in args directly

Using 'struct ploop_snapshot_param' is redundant.

Reference: ploop@991158
Makefile: add ability to add local rules

If Makefile.local is available, it is included.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
make_fs(): fix out of bounds write

This is a fix to commit ec2c767 (aka r990063).

Reported by Coverity, CID 1195049

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
get_partition_device_name(): don't ignore chmod() error

chmod() should not fail at all here, but if it is, that means
something really bad is happening, so we should tell about it
earlier rather than fail some time later.

This reverts part of commit 0be611c (aka r975730),
restoring back a part of commit 532c80d (aka r943725).

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
get_partition_device_name(): fix chmod argument

As we are creating /dev/ploopNNNp1 device, we probably
want to chmod() it but not /dev/ploopNNN which already exists.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Fix uuid strings size, use define

I was not able to figure out why any char uuid[] declaration
use size of 61, while it should be 39.

Define UUID_SIZE as 39 and use it whenever needed.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>