use the VCMD_* macros instead of the VC_CMD(...) macros
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 22 Jan 2004 21:35:36 +0000 (21:35 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 22 Jan 2004 21:35:36 +0000 (21:35 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@701 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/lib/getversion-internal.hc
util-vserver/lib/syscall-compat.hc
util-vserver/lib/syscall_getiattr-v13.hc
util-vserver/lib/syscall_gettaskxid-v13.hc
util-vserver/lib/syscall_getvxinfo-v13.hc
util-vserver/lib/syscall_kill-v11.hc
util-vserver/lib/syscall_rlimit-v11.hc
util-vserver/lib/syscall_setiattr-v13.hc

index 0e9c843..2b04967 100644 (file)
@@ -29,7 +29,7 @@
 static inline ALWAYSINLINE UNUSED int
 vc_get_version_internal(int cat)
 {
-  return vserver(VC_CMD(VERSION, 0, 0), cat, 0);
+  return vserver(VCMD_get_version, cat, 0);
 }
 
 #endif //  H_UTIL_VSERVER_LIB_GETVERSION_INTERNAL_H
index 6279d0a..3620ebc 100644 (file)
@@ -33,7 +33,7 @@ vc_new_s_context_compat(xid_t ctx, unsigned int remove_cap, unsigned int flags)
   msg.remove_cap = remove_cap;
   msg.flags      = flags;
 
-  return vserver(VC_CMD(COMPAT, 1, 1), CTX_USER2KERNEL(ctx), &msg);
+  return vserver(VCMD_new_s_context, CTX_USER2KERNEL(ctx), &msg);
 }
 
 static inline ALWAYSINLINE int
@@ -54,7 +54,7 @@ vc_set_ipv4root_compat(uint32_t  bcast, size_t nb, struct vc_ip_mask_pair const
     msg.ip_mask_pair[i].mask = ips[i].mask;
   }
 
-  return vserver(VC_CMD(COMPAT, 2, 3), nb, &msg);
+  return vserver(VCMD_set_ipv4root, nb, &msg);
 }
 
 static inline ALWAYSINLINE int
index 823a882..4e792be 100644 (file)
 #include "vserver.h"
 
 static inline ALWAYSINLINE int
-vc_get_iattr_v13(dev_t dev, ino_t ino, xid_t *xid,
-                uint32_t *flags, uint32_t *mask)
+vc_get_iattr_v13(dev_t dev, ino_t ino,
+                xid_t *xid, uint32_t *flags, uint32_t *mask)
 {
   struct vcmd_ctx_iattr_v0     attr;
   int                          rc;
 
   attr.ino = ino;
   
-  rc = vserver(VC_CMD(INODE, 2, 0), dev, &attr);
+  rc = vserver(VCMD_get_iattr, dev, &attr);
   if (xid)   *xid   = attr.xid;
   if (flags) *flags = attr.flags;
   if (mask)  *mask  = attr.mask;
index 2a9f234..18c0215 100644 (file)
@@ -23,6 +23,6 @@
 static inline ALWAYSINLINE xid_t
 vc_get_task_xid_v13(pid_t pid)
 {
-  xid_t                res=vserver(VC_CMD(VINFO, 1,0), pid, 0);
+  xid_t                res=vserver(VCMD_task_xid, pid, 0);
   return CTX_KERNEL2USER(res);
 }
index 4813eb8..11bafa6 100644 (file)
@@ -24,7 +24,7 @@ static inline ALWAYSINLINE int
 vc_get_vx_info_v13(xid_t xid, struct vc_vx_info *info)
 {
   struct vcmd_vx_info_v0       res;
-  int                          rc = vserver(VC_CMD(VINFO, 5,0), xid, &res);
+  int                          rc = vserver(VCMD_vx_info, xid, &res);
   if (rc==-1) return -1;
 
   info->xid     = CTX_KERNEL2USER(res.xid);
index 42513ab..85d751a 100644 (file)
@@ -27,5 +27,5 @@ vc_ctx_kill_v11(xid_t ctx, pid_t pid, int sig)
   param.pid = pid;
   param.sig = sig;
 
-  return vserver(VC_CMD(PROCTRL, 1, 0), ctx, &param);
+  return vserver(VCMD_ctx_kill, ctx, &param);
 }
index 46c35aa..b589198 100644 (file)
@@ -35,7 +35,7 @@ vc_get_rlimit_v11(xid_t ctx, int resource, struct vc_rlimit *lim)
   int                          rc;
 
   vc_lim.id        = resource;
-  rc = vserver(VC_CMD(RLIMIT, 1, 0), CTX_USER2KERNEL(ctx), &vc_lim);
+  rc = vserver(VCMD_get_rlimit, CTX_USER2KERNEL(ctx), &vc_lim);
   lim->min  = KERN2USR(vc_lim.minimum);
   lim->soft = KERN2USR(vc_lim.softlimit);
   lim->hard = KERN2USR(vc_lim.maximum);
@@ -53,7 +53,7 @@ vc_set_rlimit_v11(xid_t ctx, int resource, struct vc_rlimit const *lim)
   vc_lim.softlimit = USR2KERN(lim->soft);
   vc_lim.maximum   = USR2KERN(lim->hard);
 
-  return vserver(VC_CMD(RLIMIT, 2, 0), CTX_USER2KERNEL(ctx), &vc_lim);
+  return vserver(VCMD_set_rlimit, CTX_USER2KERNEL(ctx), &vc_lim);
 }
 
 static inline ALWAYSINLINE int
@@ -62,7 +62,7 @@ vc_get_rlimit_mask_v11(xid_t ctx, int UNUSED tmp, struct vc_rlimit_mask *lim)
   struct vcmd_ctx_rlimit_v0    vc_lim;
   int                          rc;
 
-  rc = vserver(VC_CMD(RLIMIT, 3, 0), CTX_USER2KERNEL(ctx), &vc_lim);
+  rc = vserver(VCMD_get_rlimit_mask, CTX_USER2KERNEL(ctx), &vc_lim);
 
   lim->min  = vc_lim.minimum;
   lim->soft = vc_lim.softlimit;
index 06e464f..bae766e 100644 (file)
@@ -31,5 +31,5 @@ vc_set_iattr_v13(dev_t dev, ino_t ino, xid_t xid,  uint32_t flags, uint32_t mask
   attr.xid   = xid;
   attr.flags = flags;
   attr.mask  = mask;
-  return vserver(VC_CMD(INODE, 1, 0), dev, &attr);
+  return vserver(VCMD_set_iattr, dev, &attr);
 }