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
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
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
#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;
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);
}
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);
param.pid = pid;
param.sig = sig;
- return vserver(VC_CMD(PROCTRL, 1, 0), ctx, ¶m);
+ return vserver(VCMD_ctx_kill, ctx, ¶m);
}
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);
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
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;
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);
}