#include "compat.h"
#include "safechroot-internal.hc"
-
#include "vserver.h"
-#include "vserver-internal.h"
#include <unistd.h>
-static inline ALWAYSINLINE int
-vc_new_s_context_compat(ctx_t ctx, unsigned int remove_cap, unsigned int flags)
+static inline ALWAYSINLINE xid_t
+vc_new_s_context_compat(xid_t ctx, unsigned int remove_cap, unsigned int flags)
{
struct vcmd_new_s_context_v1 msg;
msg.remove_cap = remove_cap;
msg.flags = flags;
- return sys_virtual_context(VC_CMD(COMPAT, 1, 1), CTX_USER2KERNEL(ctx), &msg);
+ return vserver(VCMD_new_s_context, CTX_USER2KERNEL(ctx), &msg);
}
static inline ALWAYSINLINE int
struct vcmd_set_ipv4root_v3 msg;
size_t i;
- if (nb>=NB_IPV4ROOT) {
- errno = -EINVAL;
+ if (nb>NB_IPV4ROOT) {
+ errno = -EOVERFLOW;
return -1;
}
msg.ip_mask_pair[i].mask = ips[i].mask;
}
- return sys_virtual_context(VC_CMD(COMPAT, 2, 3), nb, &msg);
+ return vserver(VCMD_set_ipv4root, nb, &msg);
}
static inline ALWAYSINLINE int