use new ensc_wrappers/ headers
[util-vserver.git] / util-vserver / src / save_ctxinfo.c
index 24d77f8..5bd0e22 100644 (file)
@@ -25,8 +25,6 @@
 #include "vserver.h"
 #include "internal.h"
 #include "util.h"
-#include "wrappers.h"
-#include "wrappers-vserver.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdio.h>
 #include <limits.h>
 
+#define ENSC_WRAPPERS_VSERVER 1
+#define ENSC_WRAPPERS_UNISTD  1
+#define ENSC_WRAPPERS_FCNTL   1
+#include <wrappers.h>
+
 int    wrapper_exit_code = 255;
 
 inline static void
@@ -51,14 +54,14 @@ int main(int argc, char *argv[])
   char         dstfile[PATH_MAX];
   int          fd;
   char         buf[sizeof(int)*3+2];
-  ctx_t                ctx;
+  xid_t                ctx;
   ssize_t      len;
   ssize_t      len1 = strlen(argv[1]);
 
   strcpy(runfile,      argv[1]);
   strcpy(runfile+len1, "/run");
 
-  ctx=Evc_X_getctx(0);
+  ctx=Evc_get_task_xid(0);
 
   if (ctx==0) {
     WRITE_MSG(2, "save_ctxinfo: Can not operate in context 0\n");