applied new kernel API (*flags* -> *cflags*, *_context -> ctx_*)
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Wed, 14 Apr 2004 23:25:13 +0000 (23:25 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Wed, 14 Apr 2004 23:25:13 +0000 (23:25 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1454 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/ensc_wrappers/wrappers-vserver.hc
util-vserver/lib_internal/switchtowatchxid.c
util-vserver/src/chcontext.c
util-vserver/src/reducecap.c
util-vserver/src/rpm-fake-resolver.c
util-vserver/src/rpm-fake.c
util-vserver/src/vattribute.c

index 3f4812a..189c61c 100644 (file)
@@ -37,29 +37,29 @@ Evc_get_task_xid(pid_t pid)
 }
 
 inline static WRAPPER_DECL xid_t
-Evc_create_context(xid_t xid)
+Evc_ctx_create(xid_t xid)
 {
-  register xid_t       res = vc_create_context(xid);
-  FatalErrnoError(res==VC_NOCTX, "vc_create_context()");
+  register xid_t       res = vc_ctx_create(xid);
+  FatalErrnoError(res==VC_NOCTX, "vc_ctx_create()");
   return res;
 }
 
 inline static WRAPPER_DECL void
-Evc_migrate_context(xid_t xid)
+Evc_ctx_migrate(xid_t xid)
 {
-  FatalErrnoError(vc_migrate_context(xid)==-1, "vc_migrate_context()");
+  FatalErrnoError(vc_ctx_migrate(xid)==-1, "vc_ctx_migrate()");
 }
 
 inline static WRAPPER_DECL void
-Evc_get_flags(xid_t xid, struct vc_ctx_flags *flags)
+Evc_get_cflags(xid_t xid, struct vc_ctx_flags *flags)
 {
-  FatalErrnoError(vc_get_flags(xid, flags)==-1, "vc_get_flags()");
+  FatalErrnoError(vc_get_cflags(xid, flags)==-1, "vc_get_cflags()");
 }
 
 inline static WRAPPER_DECL void
-Evc_set_flags(xid_t xid, struct vc_ctx_flags const *flags)
+Evc_set_cflags(xid_t xid, struct vc_ctx_flags const *flags)
 {
-  FatalErrnoError(vc_set_flags(xid, flags)==-1, "vc_set_flags()");
+  FatalErrnoError(vc_set_cflags(xid, flags)==-1, "vc_set_cflags()");
 }
 
 inline static WRAPPER_DECL void
index 855e9df..cea37fe 100644 (file)
@@ -34,13 +34,13 @@ switchToWatchXid(char const **errptr)
   if (vc_get_task_xid(0)==1) return true;
 
   if (vc_isSupported(vcFEATURE_MIGRATE)) {
-    if (vc_create_context(1)==VC_NOCTX) {
+    if (vc_ctx_create(1)==VC_NOCTX) {
       if (errno!=EEXIST) {
        if (errptr) *errptr = "vc_create_context()";
        return false;
       }
 
-      if (vc_migrate_context(1)==-1) {
+      if (vc_ctx_migrate(1)==-1) {
        if (errptr) *errptr = "vc_migrate_context()";
        return false;
       }
index 6102aa6..5d59ee7 100644 (file)
@@ -206,7 +206,7 @@ setFlags(char const *str, uint32_t *flags)
 {
   struct vc_err_listparser     err;
   
-  *flags = vc_list2flag_compat(str, 0, &err);
+  *flags = vc_list2cflag_compat(str, 0, &err);
 
   if (err.ptr!=0) {
     WRITE_MSG(2, "Unknown flag '");
index 01a9872..0c576b6 100644 (file)
@@ -254,7 +254,7 @@ int main (int argc, char *argv[])
       case CMD_FLAG            : {
        struct vc_err_listparser        err;
        
-       flags = vc_list2flag_compat(optarg, 0, &err);
+       flags = vc_list2cflag_compat(optarg, 0, &err);
        if (err.ptr!=0) {
          WRITE_MSG(2, "Unknown flag '");
          write(2, err.ptr, err.len);
index a89ee30..81e3295 100644 (file)
@@ -247,10 +247,10 @@ activateContext(xid_t xid, bool in_ctx)
       .mask     = VC_VXF_STATE_SETUP,
     };
 
-    Evc_set_flags(xid, &flags);
+    Evc_set_cflags(xid, &flags);
   }
   else if (vc_isSupported(vcFEATURE_MIGRATE))
-      Evc_migrate_context(xid);
+      Evc_ctx_migrate(xid);
   else {
 #ifdef VC_ENABLE_API_COMPAT
     Evc_new_s_context(xid, 0, S_CTX_INFO_LOCK);
index 6386d42..9160d39 100644 (file)
@@ -180,7 +180,7 @@ setupContext(xid_t xid, char const **xid_str)
     xid_t      rc=VC_NOCTX;
 
     if ((xid==VC_DYNAMIC_XID || !vc_is_dynamic_xid(xid)) &&
-       (rc=vc_create_context(xid))==VC_NOCTX &&
+       (rc=vc_ctx_create(xid))==VC_NOCTX &&
        errno!=EEXIST) {
       perror(ENSC_WRAPPERS_PREFIX "vc_create_context()");
       exit(255);
@@ -530,7 +530,7 @@ execvWorker(char const *path, char * const argv[])
   int          res = -1;
 
   if (vc_isSupported(vcFEATURE_MIGRATE))
-    res = vc_migrate_context(ctx);
+    res = vc_ctx_migrate(ctx);
   else
 #ifdef VC_ENABLE_API_COMPAT  
     res = vc_new_s_context(ctx,caps,flags);
index 566125b..8b07ff7 100644 (file)
@@ -95,7 +95,7 @@ parseFlags(char const *str, struct vc_ctx_flags *flags)
   struct vc_err_listparser     err;
   int                          rc;
 
-  rc = vc_list2flag(str,0, &err, flags);
+  rc = vc_list2cflag(str,0, &err, flags);
   
   if (rc==-1) {
     WRITE_MSG(2, "Unknown flag '");
@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
       vc_set_ccaps(args.xid, &args.caps)==-1)
     perror(ENSC_WRAPPERS_PREFIX "vc_set_ccaps()");
   else if (args.flags.mask &&
-          vc_set_flags(args.xid, &args.flags)==-1)
+          vc_set_cflags(args.xid, &args.flags)==-1)
     perror(ENSC_WRAPPERS_PREFIX "vc_set_flags()");
   else if (optind<argc)
     EexecvpD(argv[optind], argv+optind);