Implement dynamic loading of ploop library

Since vzctl is used for different OpenVZ and mainline kernels,
and the only kernel supporting ploop is RHEL6-based, a hard-coded
dependency on ploop is becoming an unnecessary burden. This is
especially true for upstream kernels. Indeed, it's kinda strange
to depend on a library which will never be used.

The problem could be solved by having two builds of vzctl: with and without
ploop support. This is way too much hassle.

Instead, this patch series implements dynamic ploop module support,
using dlopen()/dlsym() and some things provided by ploop lib (i.e.
ploop_functions structure and ploop_resolve_functions() call).

This patch adds the infrastructure to use dynamic loading, via
is_ploop_supported call. The use of this will be implemented
by the next patches.

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