#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#include "../lve-ctl.h"

int main(int argc, char *argv[])
{
	uint32_t cookie, cookie1;
	int rc, i;
	struct liblve *lve;

	rc = lve_set_default(10,11);
	if (rc) {
		printf("can't set default \n");
	}

	rc = lve_instance_init(NULL);
	printf("size for lve struct %d\n", rc);
	lve = malloc(rc);

	rc = lve_instance_init(lve);
	if (rc != 0) {
		printf("can't init lve instance %d\n", rc);
		return 1;
	}

	printf("before uid %d / gid %d\n", getuid(), getgid());

	rc = lve_enter(lve, 10, 101, 110, &cookie);
	if (rc < 0) {
		printf("error enter %d\n", rc);
		return;
	}
	printf("enter uid %d / gid %d - %x\n", getuid(), getgid(), cookie);
	while(1) { i++; }

}
