/* liblxcapi
*
* Copyright © 2012 Serge Hallyn <serge.hallyn@ubuntu.com>.
* Copyright © 2012 Canonical Ltd.
*
* it under the terms of the GNU General Public License version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <lxc/lxccontainer.h>
#include <unistd.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
{
if (c) {
c->destroy(c);
c = NULL;
}
if (c2) {
}
ret = 1;
goto out;
}
c->save_config(c, NULL);
goto out;
}
c->load_config(c, NULL);
if (!c->is_defined(c)) {
goto out;
}
if (!c2) {
goto out;
}
goto out;
}
// now test with lvm
// Only do this if clonetestlvm1 exists - user has to set this up
// in advance
c->destroy(c);
c = NULL;
if (c2) {
}
if (c2) {
}
if (c2) {
}
// lvm-copied
if (!c) {
goto out;
}
if (!c->is_defined(c)) {
ret = 0;
goto out;
}
goto out;
}
// lvm-snapshot
if (c2) {
}
goto out;
}
goto out;
}
// Now create an overlayfs clone of a dir-backed container
if ((c2 = c->clone(c, "clonetest-o1", NULL, LXC_CLONE_SNAPSHOT, "overlayfs", NULL, 0, NULL)) == NULL) {
goto out;
}
// Now create an overlayfs clone of the overlayfs clone
if ((c3 = c2->clone(c2, "clonetest-o2", NULL, LXC_CLONE_SNAPSHOT, "overlayfs", NULL, 0, NULL)) == NULL) {
goto out;
}
ret = 0;
out:
if (c3) {
}
if (c2) {
}
if (c) {
c->destroy(c);
}
}